springboot 继承shiro 使用redis缓存 @Value 标签无效 无法获取zhi
来源:互联网 发布:js utc转换 gmt 8000 编辑:程序博客网 时间:2024/05/21 09:19
在开发中使用了shiro作为权限管理,之前也没管shiro的缓存问题,就是会有点打印日志说没缓存,今天抽时间想加一下redis的缓存,一查还挺简单,但是在使用@Valle获取redis配置的时候发现无法获取:
@Value("${redis.host}")
private String host;
@Value("${redis.port}")
private int port;
@Value("${redis.pass}")
private String password;
然后发现两种方案 参考文档 参考文档中提到的stackoverflow
注释掉
@Bean(name = "lifecycleBeanPostProcessor")public LifecycleBeanPostProcessor getLifecycleBeanPostProcessor() { return new LifecycleBeanPostProcessor();}或者改成
@Bean(name = "lifecycleBeanPostProcessor")public static LifecycleBeanPostProcessor getLifecycleBeanPostProcessor() { return new LifecycleBeanPostProcessor();}就能正常获取数据了
推荐使用第二种
阅读全文
0 0
- springboot 继承shiro 使用redis缓存 @Value 标签无效 无法获取zhi
- SpringBoot--使用Redis缓存
- SpringBoot--使用Redis缓存
- SpringBoot中使用Redis实现缓存
- SpringBoot--使用redis缓存(1)
- SpringBoot--使用redis做缓存(2)
- SpringBoot项目中使用redis缓存
- 3 Springboot中使用redis,redis自动缓存异常处理
- springboot+redis作缓存
- springboot整合redis缓存
- Springboot整合Redis缓存
- springboot redis 数据缓存
- springboot使用shiro
- SpringBoot+Shiro学习之数据库动态权限管理和Redis缓存
- springboot集成Shiro,添加自定义filter后shiro的默认filter无法使用
- [Shiro入门](一)使用Redis作为缓存管理器
- springboot结合redis使用CachingConfigurerSupport方法不能被继承
- shiro整合redis做缓存
- 【开源访谈】黄东旭:“无人区”的探索者,TiDB 的前行之路
- PL/SQL9的安装
- long转hex
- map中集合的排序
- wpf简单验证
- springboot 继承shiro 使用redis缓存 @Value 标签无效 无法获取zhi
- extjs4 grid 滚动条 联动
- ArrayAdapter 和 Spinner
- linux常用命令(1)——路径、文件
- Linux环境下OK6410裸机开发详解
- 批量删除hive表分区
- 心跳机制
- Laravel使用Redis
- 2017_12_01 echarts+springboot+mybatis(动态获取数据饼图+gl三维demo)