打卡范围
This commit is contained in:
@ -68,17 +68,18 @@ public class CryptoFilter implements Filter {
|
||||
if (StringUtils.isNotBlank(headerValue)) {
|
||||
// 请求解密
|
||||
requestWrapper = new DecryptRequestBodyWrapper(servletRequest, properties.getPrivateKey(), properties.getHeaderFlag());
|
||||
} else {
|
||||
// // 是否有注解,有就报错,没有放行
|
||||
// if (ObjectUtil.isNotNull(apiEncrypt)) {
|
||||
// HandlerExceptionResolver exceptionResolver = SpringUtils.getBean("handlerExceptionResolver", HandlerExceptionResolver.class);
|
||||
// exceptionResolver.resolveException(
|
||||
// servletRequest, servletResponse, null,
|
||||
// new ServiceException("没有访问权限,请联系管理员授权", HttpStatus.FORBIDDEN));
|
||||
// return;
|
||||
// }
|
||||
throw new ServiceException("无权访问接口", HttpStatus.BAD_METHOD);
|
||||
}
|
||||
// else {
|
||||
//// // 是否有注解,有就报错,没有放行
|
||||
//// if (ObjectUtil.isNotNull(apiEncrypt)) {
|
||||
//// HandlerExceptionResolver exceptionResolver = SpringUtils.getBean("handlerExceptionResolver", HandlerExceptionResolver.class);
|
||||
//// exceptionResolver.resolveException(
|
||||
//// servletRequest, servletResponse, null,
|
||||
//// new ServiceException("没有访问权限,请联系管理员授权", HttpStatus.FORBIDDEN));
|
||||
//// return;
|
||||
//// }
|
||||
// throw new ServiceException("无权访问接口", HttpStatus.BAD_METHOD);
|
||||
// }
|
||||
}
|
||||
|
||||
// 判断是否响应加密
|
||||
|
||||
Reference in New Issue
Block a user