import spring-dao.xml后Spring容器出問題,不能創建realm的bean
嚴重: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [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 class path resource [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.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.core.JdbcTemplate] for bean with name 'jdbcTemplate' defined in class path resource [spring/spring-dao.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.core.JdbcTemplate
似乎是jdbc這里出問題了?
2019-01-24
是不是spring-dao.xml這個配置文件寫錯了。
2018-09-26
我也是這個錯誤,解決不了...
2018-08-21
我的錯誤跟你一樣的
我的這樣解決不了
2018-07-22
解決了,果然看報錯還是有用的,沒JDBC,肯定是沒加進去
一看artifacts,果然沒加,要把這兩個put into /WEB-INF/lib里面去(感覺是老問題了,為什么我這里不會自動添加呢?)