@@ -139,10 +139,11 @@ redisSessionDAO = org.crazycake.shiro.RedisSessionDAO
139139#
140140# redisSessionDAO.expire = <expire>
141141
142- # Custom your redis key prefix for session management, if you doesn't define this parameter, shiro-redis will use 'shiro_redis_session:' as default prefix
142+ # Custom your redis key prefix for session management
143+ # Default value is "shiro:session:"
143144# Note: Remember to add colon at the end of prefix.
144145#
145- # redisSessionDAO.keyPrefix = <session keyprefix >
146+ # redisSessionDAO.keyPrefix = <session key prefix >
146147
147148# Use redisManager as cache manager
148149redisSessionDAO.redisManager = $redisManager
@@ -188,9 +189,11 @@ cacheManager = org.crazycake.shiro.RedisCacheManager
188189
189190# cacheManager.keySerializer = $cacheManagerKeySerializer
190191
191- # Custom your redis key prefix for cache management, if you doesn't define this parameter, shiro-redis will use 'shiro_redis_session:' as default prefix
192+ # Custom your redis key prefix for cache management
193+ # Default value is "shiro:cache:"
192194# Note: Remember to add colon at the end of prefix.
193- cacheManager.keyPrefix = shiro:cache:
195+ #
196+ # cacheManager.keyPrefix = <cache key prefix>
194197
195198# Use redisManager as cache manager
196199cacheManager.redisManager = $redisManager
@@ -285,7 +288,7 @@ spring.xml:
285288<!-- shiro redisManager -->
286289<bean id =" redisManager" class =" org.crazycake.shiro.RedisManager" >
287290 <property name =" host" value =" 127.0.0.1:6379" />
288- <!-- optional properties:
291+ <!-- optional properties
289292 <property name="timeout" value="10000"/>
290293 <property name="password" value="123456"/>
291294 <property name="database" value="1"/>
@@ -297,8 +300,10 @@ spring.xml:
297300<!-- Redis-based session configuration -->
298301<bean id =" redisSessionDAO" class =" org.crazycake.shiro.RedisSessionDAO" >
299302 <property name =" redisManager" ref =" redisManager" />
303+ <!-- optional properties
300304 <property name="expire" value="-2"/>
301305 <property name="keyPrefix" value="shiro:session:" />
306+ -->
302307</bean >
303308<bean id =" sessionManager" class =" org.apache.shiro.web.session.mgt.DefaultWebSessionManager" >
304309 <property name =" sessionDAO" ref =" redisSessionDAO" />
@@ -307,9 +312,11 @@ spring.xml:
307312<!-- Redis-based cache configuration -->
308313<bean id =" cacheManager" class =" org.crazycake.shiro.RedisCacheManager" >
309314 <property name =" redisManager" ref =" redisManager" />
315+ <!-- optional properties
310316 <property name="expire" value="1800"/>
311317 <property name="keyPrefix" value="shiro:cache:" />
312318 <property name="principalIdFieldName" value="id" />
319+ -->
313320</bean >
314321
315322<!-- securityManager -->
@@ -334,7 +341,7 @@ If you use redis sentinel, here is an example of configuration :
334341<bean id =" redisManager" class =" org.crazycake.shiro.RedisSentinelManager" >
335342 <property name =" host" value =" 127.0.0.1:26379,127.0.0.1:26380,127.0.0.1:26381" />
336343 <property name =" masterName" value =" mymaster" />
337- <!-- optional properties:、
344+ <!-- optional properties
338345 <property name="timeout" value="2000"/>
339346 <property name="soTimeout" value="2000"/>
340347 <property name="password" value=""/>
@@ -351,7 +358,7 @@ If you use redis cluster, here is an example of configuration :
351358<!-- shiro redisManager -->
352359<bean id =" redisManager" class =" org.crazycake.shiro.RedisClusterManager" >
353360 <property name =" host" value =" 192.168.21.3:7000,192.168.21.3:7001,192.168.21.3:7002,192.168.21.3:7003,192.168.21.3:7004,192.168.21.3:7005" />
354- <!-- optional properties:
361+ <!-- optional properties
355362 <property name="timeout" value="10000"/>
356363 <property name="soTimeout" value="10000"/>
357364 <property name="maxAttempts" value="2"/>
0 commit comments