o SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadCo

很明显是shiro权限问题;

这里我使用系统内部定时器调用service 但是其中有一段代码是调用的shiro 获取subject,问题就出来这里。

此方法根本没有走http shiro路径,调用subject方法就会报错误。就如:shiro你不走我凭什么拿我的东西o SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadCo_第1张图片

o SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadCo_第2张图片

加一个try catch即可

你可能感兴趣的:(知识储备,java,shiro)