方案一:
使用springboot整合shiro时,@value注解无法读取application.yml中的配置
读取不到之前的配置如下:
将LifecycleBeanPostProcessor的配置方法改成静态的就可以了
LifecycleBeanPostProcessor配置成静态的首先加载该类,提前将bean注入到spring中,才能用@value获取配置值
方案二:
去掉shiro生命周期处理器代码
public LifecycleBeanPostProcessor getLifecycleBeanPostProcessor() {
return new LifecycleBeanPostProcessor();
}
参考文章:
https://blog.youkuaiyun.com/m0_37962779/article/details/78605478