openAPi验签

This commit is contained in:
shuo.wang
2025-07-28 09:45:19 +08:00
parent 38d1bebf66
commit a838db1fb5
2 changed files with 9 additions and 8 deletions

View File

@@ -123,9 +123,9 @@ public class OpenApiValidateFilter implements Filter {
// 2. 使用 Jackson 解析 JSON 并转为 TreeMap自动按键排序
ObjectMapper objectMapper = new ObjectMapper();
SortedMap<String, String> params = objectMapper.readValue(
SortedMap<String, Object> params = objectMapper.readValue(
jsonBody,
new TypeReference<TreeMap<String, String>>() {}
new TypeReference<TreeMap<String, Object>>() {}
);
params.put("appKey",appKey);
params.put("timestamp", timestampStr);