添加匿名url
This commit is contained in:
parent
7fc8fb5aa9
commit
8e0a954463
|
|
@ -52,7 +52,7 @@ public class ShiroConfig {
|
|||
|
||||
/**
|
||||
* Filter Chain定义说明
|
||||
*
|
||||
* <p>
|
||||
* 1、一个URL可以配置多个Filter,使用逗号分隔
|
||||
* 2、当设置多个过滤器时,全部验证通过,才视为通过
|
||||
* 3、部分过滤器可指定参数,如perms,roles
|
||||
|
|
@ -65,12 +65,12 @@ public class ShiroConfig {
|
|||
Map<String, String> filterChainDefinitionMap = new LinkedHashMap<String, String>();
|
||||
|
||||
//支持yml方式,配置拦截排除
|
||||
if(jeecgBaseConfig!=null && jeecgBaseConfig.getShiro()!=null){
|
||||
if (jeecgBaseConfig != null && jeecgBaseConfig.getShiro() != null) {
|
||||
String shiroExcludeUrls = jeecgBaseConfig.getShiro().getExcludeUrls();
|
||||
if(oConvertUtils.isNotEmpty(shiroExcludeUrls)){
|
||||
if (oConvertUtils.isNotEmpty(shiroExcludeUrls)) {
|
||||
String[] permissionUrl = shiroExcludeUrls.split(",");
|
||||
for(String url : permissionUrl){
|
||||
filterChainDefinitionMap.put(url,"anon");
|
||||
for (String url : permissionUrl) {
|
||||
filterChainDefinitionMap.put(url, "anon");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -140,6 +140,14 @@ public class ShiroConfig {
|
|||
filterChainDefinitionMap.put("/newsWebsocket/**", "anon");//CMS模块
|
||||
filterChainDefinitionMap.put("/vxeSocket/**", "anon");//JVxeTable无痕刷新示例
|
||||
|
||||
//邮件监控 排除
|
||||
filterChainDefinitionMap.put("/sysEmailLog/getDashboardDailyStats", "anon");
|
||||
filterChainDefinitionMap.put("/sysEmailLog/getRecentEmailDatas", "anon");
|
||||
filterChainDefinitionMap.put("/sysEmail/sourceList", "anon");
|
||||
//台站有效率
|
||||
filterChainDefinitionMap.put("/stationOperation/getStationProvisionEff", "anon");
|
||||
|
||||
|
||||
//性能监控——安全隐患泄露TOEKN(durid连接池也有)
|
||||
//filterChainDefinitionMap.put("/actuator/**", "anon");
|
||||
//测试模块排除
|
||||
|
|
@ -149,7 +157,7 @@ public class ShiroConfig {
|
|||
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
|
||||
//如果cloudServer为空 则说明是单体 需要加载跨域配置【微服务跨域切换】
|
||||
Object cloudServer = env.getProperty(CommonConstant.CLOUD_SERVER_KEY);
|
||||
filterMap.put("jwt", new JwtFilter(cloudServer==null));
|
||||
filterMap.put("jwt", new JwtFilter(cloudServer == null));
|
||||
shiroFilterFactoryBean.setFilters(filterMap);
|
||||
// <!-- 过滤链定义,从上向下顺序执行,一般将/**放在最为下边
|
||||
filterChainDefinitionMap.put("/**", "jwt");
|
||||
|
|
@ -183,6 +191,7 @@ public class ShiroConfig {
|
|||
|
||||
/**
|
||||
* 下面的代码是添加注解支持
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
|
|
@ -249,15 +258,15 @@ public class ShiroConfig {
|
|||
redisManager.setPassword(lettuceConnectionFactory.getPassword());
|
||||
}
|
||||
manager = redisManager;
|
||||
}else{
|
||||
} else {
|
||||
// redis集群支持,优先使用集群配置
|
||||
RedisClusterManager redisManager = new RedisClusterManager();
|
||||
Set<HostAndPort> portSet = new HashSet<>();
|
||||
lettuceConnectionFactory.getClusterConfiguration().getClusterNodes().forEach(node -> portSet.add(new HostAndPort(node.getHost() , node.getPort())));
|
||||
lettuceConnectionFactory.getClusterConfiguration().getClusterNodes().forEach(node -> portSet.add(new HostAndPort(node.getHost(), node.getPort())));
|
||||
//update-begin--Author:scott Date:20210531 for:修改集群模式下未设置redis密码的bug issues/I3QNIC
|
||||
if (oConvertUtils.isNotEmpty(lettuceConnectionFactory.getPassword())) {
|
||||
JedisCluster jedisCluster = new JedisCluster(portSet, 2000, 2000, 5,
|
||||
lettuceConnectionFactory.getPassword(), new GenericObjectPoolConfig());
|
||||
lettuceConnectionFactory.getPassword(), new GenericObjectPoolConfig());
|
||||
redisManager.setPassword(lettuceConnectionFactory.getPassword());
|
||||
redisManager.setJedisCluster(jedisCluster);
|
||||
} else {
|
||||
Loading…
Reference in New Issue
Block a user