org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [spring/shiro-core.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [spring/shiro-core.xml]: Cannot resolve reference to bean 'LoginRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [admin.web.shiro.MyRealm] for bean with name 'LoginRealm' defined in class path resource [spring/shiro-core.xml]; nested exception is java.lang.ClassNotFoundException: admin.web.shiro.MyRealm
Cannot find class [] for bean with name '' defined in class path resource
从提示上来说,是没有找到这个类
但从代码和配置上来说,有这个类,路径也没错
解决方案:最简单的方法是把项目从tomcat上移除,然后在重新用tomcat运行。
Clean Rebuild