优化:前端post请求中不包含publicKey时进行明文接收参数

master
Guo XIn 1 year ago
parent 2cd1e16dd1
commit 2d69ed8072
  1. 2
      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);