开发者社区> 问答> 正文

接手别人的项目,从eclipse导入idea,配置好其服务后一直报错,是配置文件?400报错

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

展开
收起
爱吃鱼的程序员 2020-06-05 14:53:29 629 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p><img height="44" src="https://oscimg.oschina.net/oscnet/up-45b18ea476deb33b6d11fc8851c282af852.png" width="729"><br> 你好,请仔细查询错误,这都很明显了</p>
                    
    
                        <p>shiro里面使用了 @Autowired 注入 userDao ,beans.factory找不到这个bean,先顺着shiro里面注入的类往下找有没有缺少注解,再看一下spring全局扫描是否开启了</p>
                    
    
                        <p>为啥不用maven?</p>
                    
    
                        <p>UserMapper这个bean没找到,No qualifying bean of type [com.taipingpropertyrisk.management.user.dao.mapper.UserMapper]</p>
                    
    
                            太平洋保险:joy:
                        
    
                        <p>很常见的错误,就是bean没有注入。</p>
    
    2020-06-05 14:53:47
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
蚂蚁金服高级开发工程师萧恺:IDEA 插件开发入门教程 立即下载
D2前端工程下一站 IDE ——上坡&吭头 立即下载
D2前端工程下一站 IDE 立即下载

相关镜像