feat:(hotfix) controller处理完后,把threadLocal给清空掉
This commit is contained in:
parent
13f1e142a2
commit
6a8b93548a
@ -82,7 +82,7 @@ public class DataPermissionInterceptor {
|
||||
@SneakyThrows
|
||||
public Object classHandler(ProceedingJoinPoint pjp, DataPermission dataPermission, RestController restController) {
|
||||
handle(dataPermission);
|
||||
return pjp.proceed(pjp.getArgs());
|
||||
return proceed(pjp);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -92,7 +92,17 @@ public class DataPermissionInterceptor {
|
||||
@SneakyThrows
|
||||
public Object methodHandler(ProceedingJoinPoint pjp, DataPermission dataPermission) {
|
||||
handle(dataPermission);
|
||||
return pjp.proceed(pjp.getArgs());
|
||||
return proceed(pjp);
|
||||
}
|
||||
|
||||
private static Object proceed(ProceedingJoinPoint pjp) throws Throwable {
|
||||
Object result;
|
||||
try {
|
||||
result = pjp.proceed(pjp.getArgs());
|
||||
} finally {
|
||||
ContextInfoHolder.clear();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@AfterThrowing(value = "(@within(cn.axzo.framework.datapermission.annotation.DataPermission) && @within(org.springframework.web.bind.annotation.RestController)) " +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user