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加载失败

    评论

报告相同问题?

悬赏问题

  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码