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

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

加一个try catch即可