|
|
@@ -1,6 +1,7 @@
|
|
|
package com.railway.framework.security.advice;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.alibaba.fastjson.parser.Feature;
|
|
|
import com.railway.common.core.domain.AjaxResult;
|
|
|
import com.railway.common.core.domain.dto.ReturnCode;
|
|
|
import com.railway.common.exception.sign.SignException;
|
|
|
@@ -121,7 +122,7 @@ public class SecretRequestAdvice extends RequestBodyAdviceAdapter {
|
|
|
}
|
|
|
String requestData = new String(body);
|
|
|
log.debug("requestData {}", requestData);
|
|
|
- JSONObject json = JSONObject.parseObject(requestData);
|
|
|
+ JSONObject json = JSONObject.parseObject(requestData, Feature.OrderedField); // 解决json解析后字段顺序和请求不一致
|
|
|
Map<String, String> requestMap = JsonUtil.json2Map(json);
|
|
|
String requestId = UUID.randomUUID().toString();
|
|
|
// 验证时间戳
|