Class InterceptorSpelKeyParser
java.lang.Object
com.codeupsoft.base.common.utils.InterceptorSpelKeyParser
适配 Spring 6.x + Fastjson2 的 SPEL 解析工具 修复:NPE 防护、#body.username 为 null、大小写不敏感
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class内部类:大小写不敏感的 Map(解决 UserName/username 字段名问题) -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisJsonRequest(jakarta.servlet.http.HttpServletRequest request) 判断是否为 JSON 请求(Content-Type 包含 application/json)static StringparseKey(jakarta.servlet.http.HttpServletRequest request, org.springframework.web.method.HandlerMethod handlerMethod, String spelKey) 核心方法:解析 SPEL 生成最终 Key
-
Constructor Details
-
InterceptorSpelKeyParser
public InterceptorSpelKeyParser()
-
-
Method Details
-
parseKey
-
isJsonRequest
public static boolean isJsonRequest(jakarta.servlet.http.HttpServletRequest request) 判断是否为 JSON 请求(Content-Type 包含 application/json)
-