【同步】BOOT 和 CLOUD 的功能

This commit is contained in:
YunaiV
2025-08-18 00:26:28 +08:00
parent 49572b2994
commit 8e45cf5787
19 changed files with 250 additions and 97 deletions

View File

@@ -128,6 +128,7 @@ public class ApiEncryptFilter extends ApiRequestFilter {
*
* @param request 请求
*/
@SuppressWarnings("PatternVariableCanBeUsed")
private ApiEncrypt getApiEncrypt(HttpServletRequest request) {
try {
HandlerExecutionChain mappingHandler = requestMappingHandlerMapping.getHandler(request);
@@ -135,7 +136,8 @@ public class ApiEncryptFilter extends ApiRequestFilter {
return null;
}
Object handler = mappingHandler.getHandler();
if (handler instanceof HandlerMethod handlerMethod) {
if (handler instanceof HandlerMethod) {
HandlerMethod handlerMethod = (HandlerMethod) handler;
ApiEncrypt annotation = handlerMethod.getMethodAnnotation(ApiEncrypt.class);
if (annotation == null) {
annotation = handlerMethod.getBeanType().getAnnotation(ApiEncrypt.class);