使用spring task定时器,被shiro拦截了,如何解决?

大家好,现在用spring task 做定时任务,注解实现方式,但是在启动后,等待时间到时,却报错了,个人感觉貌似被shiro的访问拦截了。 找遍了google, 百度,无法解决,希望得到帮助,本人在线等。
图片说明图片说明图片说明图片说明

在你的定时任务的代码中添加
org.apache.shiro.mgt.SecurityManager securityManager = (org.apache.shiro.mgt.SecurityManager) SpringContextHolder
.getBean("securityManager");

http://blog.csdn.net/zhujianpengzha/article/details/8140372