diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java index 82e0103e1..3dc3f2a0a 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java @@ -1,6 +1,6 @@ package org.jeecg.common.util.encryption; -import org.apache.shiro.codec.Base64; +import org.apache.shiro.lang.codec.Base64; import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index 0fbca85bd..f1f55088a 100644 --- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -11,6 +11,7 @@ import org.apache.shiro.mgt.SecurityManager; import org.apache.shiro.spring.LifecycleBeanPostProcessor; import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor; import org.apache.shiro.spring.web.ShiroFilterFactoryBean; +import org.apache.shiro.spring.web.ShiroUrlPathHelper; import org.apache.shiro.web.mgt.DefaultWebSecurityManager; import org.crazycake.shiro.*; import org.jeecg.common.constant.CommonConstant; @@ -352,16 +353,17 @@ public class ShiroConfig { return manager; } -// /** -// * 解决 ShiroRequestMappingConfig 获取 requestMappingHandlerMapping Bean 冲突 -// * spring-boot-autoconfigure:3.4.5 和 spring-boot-actuator-autoconfigure:3.4.5 -// */ -// @Primary -// @Bean -// public RequestMappingHandlerMapping shiroRequestMappingHandlerMapping( -// @Qualifier("requestMappingHandlerMapping") RequestMappingHandlerMapping handlerMapping) { -// return handlerMapping; -// } + /** + * 解决 ShiroRequestMappingConfig 获取 requestMappingHandlerMapping Bean 冲突 + * spring-boot-autoconfigure:3.4.5 和 spring-boot-actuator-autoconfigure:3.4.5 + */ + @Primary + @Bean + public RequestMappingHandlerMapping overridedRequestMappingHandlerMapping() { + RequestMappingHandlerMapping mapping = new RequestMappingHandlerMapping(); + mapping.setUrlPathHelper(new ShiroUrlPathHelper()); + return mapping; + } private List rebuildUrl(String[] bases, String[] uris) { List urls = new ArrayList<>(); diff --git a/jeecg-boot/pom.xml b/jeecg-boot/pom.xml index 3e4461135..a19914f80 100644 --- a/jeecg-boot/pom.xml +++ b/jeecg-boot/pom.xml @@ -67,7 +67,7 @@ 2.1.0 3.17.3 - 1.13.0 + 2.0.4 3.2.3 4.5.0 1.4.9