接手别人的项目,从eclipse导入idea,配置好其服务后一直报错,是配置文件初始化步骤不对的原因吗

发布于 2022-01-05 05:04:38 字数 2231 浏览 869 评论 6

ERROR [RMI TCP Connection(3)-127.0.0.1] - Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in ServletContext resource [/WEB-INF/spring-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 ServletContext resource [/WEB-INF/spring-shiro.xml]: Cannot resolve reference to bean 'usernamePasswordRealm' while setting bean property 'realms' with key [0]; nested exception is     org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usernamePasswordRealm': Injection of autowired dependencies failed; nested exception is     org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.taipingpropertyrisk.management.user.dao.UserDao com.taipingpropertyrisk.management.user.realm.UsernamePasswordRealm.userDao; nested exception is     org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': Injection of autowired dependencies failed; nested exception is     org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.taipingpropertyrisk.management.user.dao.mapper.UserMapper com.taipingpropertyrisk.management.user.dao.UserDao.userMapper; nested exception is     org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.taipingpropertyrisk.management.user.dao.mapper.UserMapper] 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)}
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring-beans.xml]: Invocation of init method failed; nested ex

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

恋你朝朝暮暮 2022-01-07 17:20:17

很常见的错误,就是bean没有注入。

彩扇题诗 2022-01-07 17:05:28

太平洋保险:joy:

猫九 2022-01-07 14:08:40

UserMapper这个bean没找到,No qualifying bean of type [com.taipingpropertyrisk.management.user.dao.mapper.UserMapper]

草莓味的萝莉 2022-01-07 13:30:26

为啥不用maven?

冬天旳寂寞 2022-01-07 09:29:59

shiro里面使用了 @Autowired 注入 userDao ,beans.factory找不到这个bean,先顺着shiro里面注入的类往下找有没有缺少注解,再看一下spring全局扫描是否开启了

顾忌 2022-01-06 00:22:54


你好,请仔细查询错误,这都很明显了

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文