Java-Shiro (nine): Shiro Redis integration to achieve unified management Session

Disclaimer: This card project is based on " the Java-Shiro (six): Shiro Realm explain the custom application and (c) Realm of " Building a project basis.

Use Redis default management Shiro in practical applications Session (SessionManager) is necessary because the default SessionManager internal memory defaults related information stored Session (); CacheManager when internal configuration (or default configuration memory using EhCache-- disk cache), the user will have to log Session information is stored in memory or on disk. Whether it is pure memory way or EhCache (memory or disk) methods are not suitable for production use (especially more concurrent user authentication system).

 

 

Guess you like

Origin www.cnblogs.com/yy3b2007com/p/12127821.html