Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
鲁鑫
topsun-bpm
Commits
ed5f93b8
Commit
ed5f93b8
authored
Oct 17, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录过期调整为5小时
parent
a9c43afa
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2 additions
and
237 deletions
+2
-237
spring-shiro-cas.xml
...-xt/src/main/resources/config/spring/spring-shiro-cas.xml
+1
-1
spring-shiro.xml
huigou-xt/src/main/resources/config/spring/spring-shiro.xml
+1
-1
spring-mybatis-plus.xml
.../src/main/resources/config/spring/spring-mybatis-plus.xml
+0
-60
spring-shiro-cache.xml
...t/src/main/resources/config/spring/spring-shiro-cache.xml
+0
-25
spring-shiro_bak.xml
...-xt/src/main/resources/config/spring/spring-shiro_bak.xml
+0
-129
spring-system-cache.xml
.../src/main/resources/config/spring/spring-system-cache.xml
+0
-21
No files found.
huigou-xt/src/main/resources/config/spring/spring-shiro-cas.xml
View file @
ed5f93b8
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<bean
id=
"sessionManager"
class=
"com.huigou.shiro.session.ShiroSessionManager"
>
<bean
id=
"sessionManager"
class=
"com.huigou.shiro.session.ShiroSessionManager"
>
<property
name=
"sessionDAO"
ref=
"shiroSessionDAO"
/>
<property
name=
"sessionDAO"
ref=
"shiroSessionDAO"
/>
<!-- session 有效时间为半小时 (毫秒单位) -->
<!-- session 有效时间为半小时 (毫秒单位) -->
<property
name=
"globalSessionTimeout"
value=
"1800000"
/>
<property
name=
"globalSessionTimeout"
value=
"1800000
0
"
/>
<property
name=
"sessionValidationInterval"
value=
"1800000"
/>
<property
name=
"sessionValidationInterval"
value=
"1800000"
/>
<property
name=
"sessionValidationSchedulerEnabled"
value=
"false"
/>
<property
name=
"sessionValidationSchedulerEnabled"
value=
"false"
/>
<!-- 更改session cookie的名字 -->
<!-- 更改session cookie的名字 -->
...
...
huigou-xt/src/main/resources/config/spring/spring-shiro.xml
View file @
ed5f93b8
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<bean
id=
"shiroSessionManager"
class=
"com.huigou.shiro.session.ShiroSessionManager"
>
<bean
id=
"shiroSessionManager"
class=
"com.huigou.shiro.session.ShiroSessionManager"
>
<property
name=
"sessionDAO"
ref=
"shiroSessionDAO"
/>
<property
name=
"sessionDAO"
ref=
"shiroSessionDAO"
/>
<!-- session 有效时间为半小时 (毫秒单位) -->
<!-- session 有效时间为半小时 (毫秒单位) -->
<property
name=
"globalSessionTimeout"
value=
"1800000"
/>
<property
name=
"globalSessionTimeout"
value=
"1800000
0
"
/>
<property
name=
"sessionValidationInterval"
value=
"1800000"
/>
<property
name=
"sessionValidationInterval"
value=
"1800000"
/>
<property
name=
"sessionValidationSchedulerEnabled"
value=
"false"
/>
<property
name=
"sessionValidationSchedulerEnabled"
value=
"false"
/>
<!-- 更改session cookie的名字 -->
<!-- 更改session cookie的名字 -->
...
...
topsun-xt/src/main/resources/config/spring/spring-mybatis-plus.xml
deleted
100644 → 0
View file @
a9c43afa
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
>
<!-- SqlSessionFactory Config -->
<bean
id=
"sqlSessionFactory"
class=
"com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<!-- <property name="configuration" ref="configuration"/>-->
<!--<property name="mapperLocations" value="classpath:/config/topsun/mapper/**/*.xml"/>-->
<property
name=
"globalConfig"
ref=
"globalConfig"
/>
<property
name=
"plugins"
>
<array>
<ref
bean=
"mybatisPlusInterceptor"
/>
</array>
</property>
</bean>
<!-- <bean id="configuration" class="com.baomidou.mybatisplus.core.MybatisConfiguration">-->
<!-- <property name="useDeprecatedExecutor" value="false"/>-->
<!-- </bean>-->
<bean
id=
"mybatisPlusInterceptor"
class=
"com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor"
>
<property
name=
"interceptors"
>
<list>
<ref
bean=
"paginationInnerInterceptor"
/>
</list>
</property>
</bean>
<bean
id=
"paginationInnerInterceptor"
class=
"com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor"
>
<constructor-arg
name=
"dbType"
value=
"H2"
/>
<property
name=
"optimizeJoin"
value=
"true"
/>
</bean>
<!-- <bean id="countSqlParser"-->
<!-- class="com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize">-->
<!-- <property name="optimizeJoin" value="true"/>-->
<!-- </bean>-->
<bean
id=
"globalConfig"
class=
"com.baomidou.mybatisplus.core.config.GlobalConfig"
>
<property
name=
"dbConfig"
ref=
"dbConfig"
/>
</bean>
<bean
id=
"dbConfig"
class=
"com.baomidou.mybatisplus.core.config.GlobalConfig.DbConfig"
>
<property
name=
"keyGenerators"
>
<list>
<bean
class=
"com.baomidou.mybatisplus.extension.incrementer.H2KeyGenerator"
/>
</list>
</property>
</bean>
<!-- MyBatis Mapper Scan Config -->
<bean
class=
"org.mybatis.spring.mapper.MapperScannerConfigurer"
>
<property
name=
"basePackage"
value=
"com.huigou.topsun.**.mapper"
/>
</bean>
</beans>
\ No newline at end of file
topsun-xt/src/main/resources/config/spring/spring-shiro-cache.xml
deleted
100644 → 0
View file @
a9c43afa
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd"
>
<!-- redis 实现 -->
<!-- redisSessionDAO -->
<bean
id=
"shiroSessionDAO"
class=
"org.crazycake.shiro.RedisSessionDAO"
>
<property
name=
"redisManager"
ref=
"shiroRedisManager"
/>
</bean>
<!-- cacheManager -->
<bean
id=
"shiroCacheManager"
class=
"org.crazycake.shiro.RedisCacheManager"
>
<property
name=
"redisManager"
ref=
"shiroRedisManager"
/>
</bean>
<!-- shiro redisManager -->
<bean
id=
"shiroRedisManager"
class=
"org.crazycake.shiro.RedisManager"
>
<property
name=
"host"
value=
"${shiro.host}"
/>
<property
name=
"port"
value=
"${shiro.port}"
/>
<property
name=
"expire"
value=
"${shiro.expire}"
/>
</bean>
</beans>
topsun-xt/src/main/resources/config/spring/spring-shiro_bak.xml
deleted
100644 → 0
View file @
a9c43afa
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd"
>
<!--继承继承重写DefaultWebSessionManager,解决频繁访问redis的问题 -->
<bean
id=
"sessionManager"
class=
"com.huigou.shiro.session.ShiroSessionManager"
>
<property
name=
"sessionDAO"
ref=
"shiroSessionDAO"
/>
<!-- session 有效时间为半小时 (毫秒单位) -->
<property
name=
"globalSessionTimeout"
value=
"1800000"
/>
<property
name=
"sessionValidationInterval"
value=
"1800000"
/>
<property
name=
"sessionValidationSchedulerEnabled"
value=
"false"
/>
<!-- 更改session cookie的名字 -->
<property
name=
"sessionIdCookie.name"
value=
"SSESSIONID"
/>
<!-- session cookie 增加secure 属性-->
<property
name=
"sessionIdCookie.secure"
value=
"true"
/>
<property
name=
"sessionListeners"
>
<list>
<ref
bean=
"shiroSessionListener"
/>
</list>
</property>
</bean>
<bean
id=
"shiroSessionListener"
class=
"com.huigou.shiro.session.ShiroSessionListener"
>
<property
name=
"sessionDAO"
ref=
"shiroSessionDAO"
/>
<!-- 清除cas缓存 -->
<property
name=
"icache"
ref=
"casTicketCache"
/>
</bean>
<!-- 系统默认认证及授权域 -->
<bean
id=
"standardRealm"
class=
"com.huigou.shiro.realm.StandardRealm"
/>
<!-- 不需要密码直接登录 -->
<bean
id=
"simpleRealm"
class=
"com.huigou.shiro.realm.SimpleRealm"
/>
<bean
id=
"securityManager"
class=
"org.apache.shiro.web.mgt.DefaultWebSecurityManager"
>
<property
name=
"sessionManager"
ref=
"sessionManager"
/>
<property
name=
"cacheManager"
ref=
"shiroCacheManager"
/>
<property
name=
"subjectFactory"
ref=
"casSubjectFactory"
/>
<property
name=
"realms"
>
<list>
<ref
bean=
"standardRealm"
/>
<ref
bean=
"ldapRealm"
/>
<ref
bean=
"casRealm"
/>
<ref
bean=
"simpleRealm"
/>
</list>
</property>
</bean>
<bean
class=
"org.springframework.beans.factory.config.MethodInvokingFactoryBean"
>
<property
name=
"staticMethod"
value=
"org.apache.shiro.SecurityUtils.setSecurityManager"
/>
<property
name=
"arguments"
ref=
"securityManager"
/>
</bean>
<bean
id=
"shiroFilter"
class=
"org.apache.shiro.spring.web.ShiroFilterFactoryBean"
>
<property
name=
"securityManager"
ref=
"securityManager"
/>
<property
name=
"loginUrl"
value=
"${shiro.loginUrl}"
/>
<!-- cas 单点登录添加过滤器 -->
<property
name=
"filters"
>
<map>
<entry
key=
"cas"
value-ref=
"casFilter"
/>
<entry
key=
"casLogout"
value-ref=
"casLogoutFilter"
/>
</map>
</property>
<!-- filterChainDefinitions 中添加 /Login.jsp = cas -->
<property
name=
"filterChainDefinitions"
>
<value>
/login = anon
/Login.jsp = casLogout,cas
/logout = logout
/static/** = anon
/images/**= anon
/lib/** = anon
/** = casLogout
</value>
</property>
</bean>
<bean
class=
"org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor"
>
<property
name=
"securityManager"
ref=
"securityManager"
/>
</bean>
<!-- ldap 配置 AD也是这样配置-->
<bean
id=
"contextFactory"
class=
"org.apache.shiro.realm.ldap.JndiLdapContextFactory"
>
<property
name=
"url"
value=
"${shiro.ldap.serverUrlPrefix}"
/>
<property
name=
"systemUsername"
value=
"${shiro.ldap.systemUsername}"
/>
<property
name=
"systemPassword"
value=
"${shiro.ldap.systemPassword}"
/>
</bean>
<!-- 配置登录认证访问ldap的树域 -->
<bean
id=
"ldapRealm"
class=
"com.huigou.shiro.realm.LdapRealm"
>
<property
name=
"userDnTemplate"
value=
"${shiro.ldap.userDnTemplate}"
/>
<property
name=
"contextFactory"
ref=
"contextFactory"
/>
</bean>
<!-- shiro cas config -->
<bean
id=
"casSubjectFactory"
class=
"org.apache.shiro.cas.CasSubjectFactory"
/>
<!-- 替换原来的 Realm-->
<bean
id=
"casRealm"
class=
"com.huigou.shiro.realm.CasStandardRealm"
>
<!--casServerUrlPrefix 是CAS Server服务器端地址 -->
<property
name=
"casServerUrlPrefix"
value=
"${shiro.cas.serverUrlPrefix}"
/>
<!-- 客户端的回调地址设置,必须和过滤器拦截的地址一致 -->
<property
name=
"casService"
value=
"${shiro.cas.service}/Login.jsp"
/>
<property
name=
"singleSignOutHandler"
ref=
"singleSignOutHandler"
/>
</bean>
<bean
id=
"casFilter"
class=
"com.huigou.shiro.filter.CasFilter"
>
<!-- 配置验证错误时的失败页面 -->
<property
name=
"failureUrl"
value=
"${shiro.cas.serverUrlPrefix}/login?service=${shiro.cas.service}/Login.jsp"
/>
<property
name=
"successUrl"
value=
"/Index.jsp"
/>
</bean>
<!-- 记录ticket和sessionID的映射的缓存 -->
<bean
id=
"casTicketCache"
class=
"com.huigou.cache.service.impl.RedisCacheImpl"
>
<property
name=
"redisTemplate"
ref=
"redisTemplate"
/>
<property
name=
"name"
value=
"casTicketCache"
/>
<property
name=
"liveTime"
value=
"${shiro.expire}"
/>
<property
name=
"compressed"
value=
"true"
/>
</bean>
<!-- cas单点登出请求处理 -->
<bean
id=
"casLogoutFilter"
class=
"com.huigou.shiro.filter.CasLogoutFilter"
>
<property
name=
"singleSignOutHandler"
ref=
"singleSignOutHandler"
/>
</bean>
<bean
id=
"singleSignOutHandler"
class=
"com.huigou.shiro.filter.SingleSignOutHandler"
>
<property
name=
"icache"
ref=
"casTicketCache"
/>
<property
name=
"sessionManager"
ref=
"sessionManager"
/>
</bean>
</beans>
topsun-xt/src/main/resources/config/spring/spring-system-cache.xml
deleted
100644 → 0
View file @
a9c43afa
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns=
"http://www.springframework.org/schema/beans"
xsi:schemaLocation=
"
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"
>
<!-- 使用 Redis 缓存系统数据缓存 数据字典 系统参数等-->
<bean
id=
"sysDataCache"
class=
"com.huigou.cache.service.impl.RedisCacheImpl"
>
<property
name=
"redisTemplate"
ref=
"redisTemplate"
/>
<property
name=
"name"
value=
"sysDataCache"
/>
</bean>
<bean
id=
"permissionCache"
class=
"com.huigou.cache.service.impl.RedisCacheImpl"
>
<property
name=
"redisTemplate"
ref=
"redisTemplate"
/>
<property
name=
"name"
value=
"permissionCache"
/>
<property
name=
"liveTime"
value=
"3600"
/>
<property
name=
"compressed"
value=
"true"
/>
</bean>
</beans>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment