GoBiOlderWang 2017-07-18 09:57 采纳率: 0%
浏览 1225

使用maven布了一个shiro,为什么会报出这样的错误,希望有接触过朋友帮帮忙。。。

Error creating bean with name 'shiroFilter' defined in file [D:\TomCat\apache-tomcat-7.0.75\webapps\qth_ssm_mapper\WEB-INF\classes\config\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:\TomCat\apache-tomcat-7.0.75\webapps\qth_ssm_mapper\WEB-INF\classes\config\spring\applicationContext-shiro.xml]: Cannot resolve reference to bean 'userRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRealm': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.question.service.ITbUserService com.user.shiro.UserRealm.userService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.question.service.ITbUserService] 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)}

不应该是自动注入出现的问题才对吧 我之前的自动注入都是可以的 而且我又检查了一遍,实在不知道是什么原因

  • 写回答

4条回答 默认 最新

  • 诗意小码农 2017-07-18 10:08
    关注

    xml文件配置出错了,所以在spring加载的时候beanfactory加载失败

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算