求大佬帮忙

来源:4-2 Shiro集成Spring-从数据库获取数据

慕慕5730352

2018-08-21 09:38

https://img4.mukewang.com/5b7b6cdf0001538b17490798.jpgorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in URL [file:/F:/imooc-shiro/shiro-web/target/shiro-web-1.0-SNAPSHOT/WEB-INF/classes/spring/spring.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 URL [file:/F:/imooc-shiro/shiro-web/target/shiro-web-1.0-SNAPSHOT/WEB-INF/classes/spring/spring.xml]: Cannot resolve reference to bean 'realm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'realm': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDaoImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}

写回答 关注

1回答

  • 慕粉1613588699
    2018-08-21 16:25:50

    在web.xml文件中把springmvc.xml文件位置复制一份到如下:

    https://img3.mukewang.com/5b7bcc8c00018e9607660247.jpg

Shiro安全框架入门

从零入门Shiro安全框架

48036 学习 · 332 问题

查看课程

相似问题