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

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

這個bug怎么改?第一次用Idea和第一次寫boot


UnsatisfiedDependencyException: Error creating bean with name 'areaDao' defined in file [C:\Users\37991\IdeaProjects\test\mvndemo\target\classes\com\mvn\mvndemo\dao\AreaDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/mvn/mvndemo/config/dao/SessionFactoryConfiguration.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.? Cause: org.xml.sax.SAXParseException; lineNumber: 22; columnNumber: 6; 不允許有匹配 "[xX][mM][lL]" 的處理指令目標。


?Error creating bean with name 'areaDao' defined in file [C:\Users\37991\IdeaProjects\test\mvndemo\target\classes\com\mvn\mvndemo\dao\AreaDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/mvn/mvndemo/config/dao/SessionFactoryConfiguration.class]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.? Cause: org.xml.sax.SAXParseException; lineNumber: 22; columnNumber: 6; 不允許有匹配 "[xX][mM][lL]" 的處理指令目標。


正在回答

4 回答

請問樓主找到解決方案了嗎?

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

作者的這個教程比較偏向spring,配置會比較繁瑣,你要學springboot的話可以去看看廖師兄的springboot進階。

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

那可能就是dao層的配置有問題了,你認真檢查一遍試試

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

沒有找到areDao,引用dao層的時候有沒有加@Autowired注解呀

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

qq_賤字如霧_0 提問者

數據源配置 那個類上我加了@MapperScan("com.mvn.mvndemo.dao")
2019-03-15 回復 有任何疑惑可以回復我~
#2

qq_賤字如霧_0 提問者

加了 @Autowired private AreaDao areaDao;
2019-03-15 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

這個bug怎么改?第一次用Idea和第一次寫boot

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

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

幫助反饋 APP下載

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

公眾號

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