diff --git a/shandan-system/src/main/java/com/keyware/shandan/frame/aspect/SafetyAspect.java b/shandan-system/src/main/java/com/keyware/shandan/frame/aspect/SafetyAspect.java index 7742803..6f7fec8 100644 --- a/shandan-system/src/main/java/com/keyware/shandan/frame/aspect/SafetyAspect.java +++ b/shandan-system/src/main/java/com/keyware/shandan/frame/aspect/SafetyAspect.java @@ -80,7 +80,7 @@ public class SafetyAspect { Object result = joinPoint.proceed(AspectUtil.parseJoinPointArgs(joinPoint, request)); //执行方法之前解密,且只拦截post请求 - if ("post".equalsIgnoreCase(request.getMethod()) && !ServletFileUpload.isMultipartContent(request)) { + if ("post".equalsIgnoreCase(request.getMethod()) && !ServletFileUpload.isMultipartContent(request) && StringUtils.hasText(publicKey)) { // 返回之前对结果进行加密 //每次响应之前随机获取AES的key,加密data数据 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);