美文网首页
ssm框架整合shiro报异常Error creating be

ssm框架整合shiro报异常Error creating be

作者: Jure_joe | 来源:发表于2020-02-27 16:54 被阅读0次
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in file [D:\maven\appach-tomcat\apache-tomcat-8.5.38\wtpwebapps\CIB\WEB-INF\classes\spring\applicationContext-shiro.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 file [D:\maven\appach-tomcat\apache-tomcat-8.5.38\wtpwebapps\CIB\WEB-INF\classes\spring\applicationContext-shiro.xml]: Cannot resolve reference to bean 'customRealm' while setting bean property 'realm';

nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customRealm': Injection of autowired dependencies failed;

nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.CIB.service.SysService com.CIB.shiro.CustomRealm.sysService;

nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.CIB.service.SysService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

整了半天发现自己的service层没有加注解,service层采用的是包扫描方式,因为没加注解就成这样,还以为自己的web.xml中的shiro Fileter过滤器配置错误呢

image.png

相关文章

网友评论

      本文标题:ssm框架整合shiro报异常Error creating be

      本文链接:https://www.haomeiwen.com/subject/aolxhhtx.html