diff --git a/disjob-admin/ruoyi-common/src/main/java/com/ruoyi/common/utils/spring/SpringUtils.java b/disjob-admin/ruoyi-common/src/main/java/com/ruoyi/common/utils/spring/SpringUtils.java index bb546c01a..18d33ec01 100644 --- a/disjob-admin/ruoyi-common/src/main/java/com/ruoyi/common/utils/spring/SpringUtils.java +++ b/disjob-admin/ruoyi-common/src/main/java/com/ruoyi/common/utils/spring/SpringUtils.java @@ -163,10 +163,10 @@ public static String getRequiredProperty(String key) public static Set findAllAnonymousRequestMappings() { Set anonymousUrls = new HashSet<>(); - RequestMappingHandlerMapping mappings = applicationContext.getBean("requestMappingHandlerMapping", RequestMappingHandlerMapping.class); - mappings.getHandlerMethods().forEach((requestMappingInfo, handlerMethod) -> { + RequestMappingHandlerMapping mapping = applicationContext.getBean("requestMappingHandlerMapping", RequestMappingHandlerMapping.class); + mapping.getHandlerMethods().forEach((requestMappingInfo, handlerMethod) -> { if (getAnnotation(handlerMethod, Anonymous.class) != null) { - // #getPatternValues()会包含:`/system/menu/add/{parentId}` + // #getPatternValues()会包含占位符路径:`/system/menu/add/{parentId}` anonymousUrls.addAll(requestMappingInfo.getDirectPaths()); } });