shiro整合springboot-03-缓存
使用CacheManager
1 Cache 作用
- Cache 缓存: 计算机内存中一段数据
- 作用: 用来减轻DB的访问压力,从而提高系统的查询效率
- 流程:

2 .使用shiro中默认EhCache实现缓存
(1).引入依赖
<!--引入shiro和ehcache--> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-ehcache</artifactId> <version>1.5.3</version> </dependency>
(2).开启缓存

浙公网安备 33010602011771号