- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/alexxiyang/shiro-redis
- 软件文档: https://github.com/alexxiyang/shiro-redis
软件介绍
shiro 的cache只提供了ehcache和concurrentHashMap的实现。这是一个redis 的cache实现。希望可以帮到你们
如何使用
添加以下依赖到pom.xml
org.crazycake shiro-redis 2.4.2.1-RELEASE
如何配置
有2种配置方式:
ini文件
spring配置文件
ini方式:
#redisManager redisManager = org.crazycake.shiro.RedisManager #optional if you don't specify host the default value is 127.0.0.1 redisManager.host = 127.0.0.1 #optional , default value: 6379 redisManager.port = 6379 #optional, default value:0 .The expire time is in second redisManager.expire = 30 #optional, timeout for jedis try to connect to redis server(In milliseconds), not equals to expire time! redisManager.timeout = 0 #optional, password for redis server redisManager.password = #============redisSessionDAO============= redisSessionDAO = org.crazycake.shiro.RedisSessionDAO redisSessionDAO.redisManager = $redisManager sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager sessionManager.sessionDAO = $redisSessionDAO securityManager.sessionManager = $sessionManager #============redisCacheManager=========== cacheManager = org.crazycake.shiro.RedisCacheManager cacheManager.redisManager = $redisManager #custom your redis key prefix, if you doesn't define this parameter shiro-redis will use 'shiro_redis_session:' as default prefix shiroCacheManager.keyPrefix = users:security:authz: securityManager.cacheManager = $cacheManager
spring配置文件方式
/login.jsp = anon /user/** = anon /register/** = anon /unauthorized.jsp = anon /css/** = anon /js/** = anon /** = authc
就是这样,这么简单!
提供一个与springBoot集成的案列
Python网络编程攻略
萨卡尔 (Dr.M.O.Faruque Sarker) / 安道 / 人民邮电出版社 / 2014-12-1 / 45.00元
开发TCP/IP网络客户端和服务器应用 管理本地设备的IPv4/IPv6网络接口 使用HTTP和HTTPS协议编写用途多、效率高的Web客户端 编写可使用常见电子邮件协议的电子邮件客户端 通过Telnet和SSH连接执行远程系统管理任务 使用Web服务与流行的网站交互 监控并分析重要的常见网络安全漏洞一起来看看 《Python网络编程攻略》 这本书的介绍吧!
