This commit is contained in:
Administrator
2024-05-15 14:42:32 +08:00
parent e514c1a8e0
commit aa0de67d20
2 changed files with 1 additions and 9 deletions

View File

@@ -6,12 +6,10 @@ import com.demo.gateway.utils.AESUtil;
public class test {
public static void main(String[] args) {
String str = "CvCb2zEd9u1VL0zEfulTyppeV0QmnjSwFLjZHEsXdzYdYcXuEo+p3ayKLUwt1mN+";
String str = "UwIp0SbT5vF5Q7hb/uYPNFCgg37rUzAEmWF+CVMGWhF+g/0VGEMNafllCiTJSHLio9Uj3ZLn79ZyXsIbomhNCg==";
//String encrypt = AESUtil.encrypt(str, "MTIzNDU2Nzg5MTIzNDU2Nw==");
String decrypt = AESUtil.decrypt(str, "MTIzNDU2Nzg5MTIzNDU2Nw==");
System.out.println(decrypt);
JSONObject jsonObject = JSON.parseObject("{\"bookname\":\"算法笔记\",\"borrownum\":2,\"isbn\":\"92392321222\",\"lendTime\":\"2021-12-18 10:57:02\",\"readerId\":13,\"returnTime\":\"2021-12-18 11:03:55\",\"status\":\"1\"}");
System.out.println(jsonObject.getString("bookname"));
}
}

View File

@@ -20,12 +20,6 @@ public class AccessControlInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
// HttpServletRequest httpServletRequest = request;
// CachedBodyHttpServletRequest cachedBodyHttpServletRequest = new CachedBodyHttpServletRequest(httpServletRequest);
//
// String body = new String(toByteArray(cachedBodyHttpServletRequest.getInputStream()), StandardCharsets.UTF_8);
// System.out.println("content-length: "+ request.getHeader("content-length"));
// System.out.println("Request Body: " + body); // 打印请求体日志
// 获取请求中的所有 Cookie
try {