ci: shiro redisson version
This commit is contained in:
parent
f545fb9ccb
commit
f1981d1baa
|
@ -30,6 +30,26 @@
|
|||
<version>${quartz-starter.version}</version>
|
||||
</dependency>
|
||||
<!-- start shiro -->
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-spring-boot-web-starter</artifactId>
|
||||
<version>${shiro.version}</version>
|
||||
<classifier>jakarta</classifier>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-spring-boot-starter</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-web</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-spring</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-spring-boot-starter</artifactId>
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
package io.metersphere.system.config;
|
||||
|
||||
|
||||
import io.metersphere.sdk.util.FilterChainUtils;
|
||||
import io.metersphere.system.security.ApiKeyFilter;
|
||||
import io.metersphere.system.security.CsrfFilter;
|
||||
import io.metersphere.system.security.MsPermissionAnnotationMethodInterceptor;
|
||||
import io.metersphere.system.security.realm.LocalRealm;
|
||||
import io.metersphere.sdk.util.FilterChainUtils;
|
||||
import jakarta.servlet.DispatcherType;
|
||||
import jakarta.servlet.Filter;
|
||||
import org.apache.shiro.aop.AnnotationResolver;
|
||||
import org.apache.shiro.authz.aop.*;
|
||||
import org.apache.shiro.cache.CacheManager;
|
||||
|
@ -22,12 +20,13 @@ import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
|
|||
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
|
||||
import org.apache.shiro.web.session.mgt.ServletContainerSessionManager;
|
||||
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.DependsOn;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Configuration
|
||||
public class ShiroConfig {
|
||||
|
@ -54,13 +53,6 @@ public class ShiroConfig {
|
|||
return shiroFilterFactoryBean;
|
||||
}
|
||||
|
||||
@Bean(name = "shiroFilter")
|
||||
public FilterRegistrationBean<Filter> shiroFilter(ShiroFilterFactoryBean shiroFilterFactoryBean) throws Exception {
|
||||
FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<>();
|
||||
registration.setFilter((Filter) Objects.requireNonNull(shiroFilterFactoryBean.getObject()));
|
||||
registration.setDispatcherTypes(EnumSet.allOf(DispatcherType.class));
|
||||
return registration;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public MemoryConstrainedCacheManager memoryConstrainedCacheManager() {
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package io.metersphere.system.controller.handler;
|
||||
|
||||
import io.metersphere.sdk.exception.IResultCode;
|
||||
import io.metersphere.system.controller.handler.result.MsHttpResultCode;
|
||||
import io.metersphere.sdk.exception.MSException;
|
||||
import io.metersphere.system.utils.ServiceUtils;
|
||||
import io.metersphere.sdk.util.Translator;
|
||||
import io.metersphere.system.controller.handler.result.MsHttpResultCode;
|
||||
import io.metersphere.system.utils.ServiceUtils;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.ShiroException;
|
||||
import org.apache.shiro.authz.UnauthorizedException;
|
||||
import org.apache.shiro.lang.ShiroException;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.FieldError;
|
||||
|
@ -51,6 +51,7 @@ public class RestControllerExceptionHandler {
|
|||
|
||||
/**
|
||||
* http 状态码返回405
|
||||
*
|
||||
* @param exception 异常信息
|
||||
* @return
|
||||
*/
|
||||
|
@ -96,6 +97,7 @@ public class RestControllerExceptionHandler {
|
|||
|
||||
/**
|
||||
* 当抛出 NOT_FOUND,拼接资源名称
|
||||
*
|
||||
* @param message
|
||||
* @return
|
||||
*/
|
||||
|
@ -134,6 +136,7 @@ public class RestControllerExceptionHandler {
|
|||
/**
|
||||
* 格式化异常信息
|
||||
* 当出现未知异常时,将错误栈信息格式化返回
|
||||
*
|
||||
* @param e
|
||||
* @return
|
||||
*/
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -21,7 +21,7 @@
|
|||
<revision>3.x</revision>
|
||||
<java.version>21</java.version>
|
||||
<platform-plugin-sdk.version>1.5.0</platform-plugin-sdk.version>
|
||||
<shiro.version>1.13.0</shiro.version>
|
||||
<shiro.version>2.0.0</shiro.version>
|
||||
<java-websocket.version>1.5.4</java-websocket.version>
|
||||
<easyexcel.version>3.3.3</easyexcel.version>
|
||||
<dom4j.version>2.1.4</dom4j.version>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<metersphere-jmeter-functions.version>3.0</metersphere-jmeter-functions.version>
|
||||
<metersphere-jmeter-assertions.version>1.0.2</metersphere-jmeter-assertions.version>
|
||||
<quartz-starter.version>1.0.7</quartz-starter.version>
|
||||
<redisson-starter.version>3.27.0</redisson-starter.version>
|
||||
<redisson-starter.version>3.27.1</redisson-starter.version>
|
||||
<mybatis-starter.version>3.0.3</mybatis-starter.version>
|
||||
<reflections.version>0.10.2</reflections.version>
|
||||
<commons-io.version>2.15.1</commons-io.version>
|
||||
|
|
Loading…
Reference in New Issue