亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

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這里出問題了?

正在回答

4 回答

是不是spring-dao.xml這個配置文件寫錯了。

<bean?class="com.alibaba.druid.pool.DruidDataSource"?id="dataSource">


0 回復 有任何疑惑可以回復我~

我也是這個錯誤,解決不了...

0 回復 有任何疑惑可以回復我~

我的錯誤跟你一樣的

我的這樣解決不了

0 回復 有任何疑惑可以回復我~

https://img1.sycdn.imooc.com//5b540cbc0001789f12410406.jpg

解決了,果然看報錯還是有用的,沒JDBC,肯定是沒加進去

一看artifacts,果然沒加,要把這兩個put into /WEB-INF/lib里面去(感覺是老問題了,為什么我這里不會自動添加呢?)

1 回復 有任何疑惑可以回復我~
#1

qq_袮D影孑_03909390

這個放進去的意思在哪?maven不是會自動導入依賴的?
2018-10-28 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

import spring-dao.xml后Spring容器出問題,不能創建realm的bean

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號