No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadC
org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible tothe calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vmstatic singleton.This is an in
·
错误产生环境
SpringBoot整合Shiro时产生
错误描述
org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to
the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm
static singleton. This is an invalid application configuration.
错误原因
本来是想用@Configuration
注解的,直接使用到了@CacheConfig
注解,主要是用错了注解,有的接口能访问,有的不能访问。直到后面排查IOC容器时,发现shiro相关的对象都没注入进去,才发现问题。
我真的栓Q了家人们!
解决办法
@CacheConfig
注解替换为@Configuration
注解,问题解决
更多推荐
所有评论(0)