mybitis: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory';

警告: Bean creation exception on non-lazy FactoryBean type check: 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserMapper' 
defined in URL [file:/D:/iflytekStudy/myproject/target/classes/spring-mvc.xml]: Cannot resolve reference to 
bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
'sqlSessionFactory' defined in URL [file:/D:/iflytekStudy/myproject/target/classes/spring-mvc.xml]: Invocation of 
init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping 
resource: 'file [D:\iflytekStudy\myproject\target\classes\mapper\UserMapper.xml]'; nested exception is 
org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: 
org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: 
org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.iflytek.cms.pojo.User'.  Cause: 
java.lang.ClassNotFoundException: Cannot find class: com.iflytek.cms.pojo.User

Paste_Image.png

**
用generator時(shí)出現(xiàn)的錯(cuò)誤:這個(gè)錯(cuò)誤的地方不在mybatis配置文件,在mapper.xml中:
**

Paste_Image.png
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 1. 簡(jiǎn)介 1.1 什么是 MyBatis ? MyBatis 是支持定制化 SQL、存儲(chǔ)過(guò)程以及高級(jí)映射的優(yōu)秀的...
    笨鳥慢飛閱讀 6,219評(píng)論 0 4
  • 前言 本篇將完成DAO層的設(shè)計(jì)與開發(fā),包括: 數(shù)據(jù)庫(kù)、DAO實(shí)體與接口設(shè)計(jì)與編碼 基于MyBatis實(shí)現(xiàn)DAO編程...
    MOVE1925閱讀 1,472評(píng)論 0 4
  • Spring 技術(shù)筆記Day 1 預(yù)熱知識(shí)一、 基本術(shù)語(yǔ)Blob類型,二進(jìn)制對(duì)象Object Graph:對(duì)象圖...
    OchardBird閱讀 1,074評(píng)論 0 2
  • 城市里堅(jiān)硬的建筑高聳,變暗的讓人感到寒冷的色調(diào)到處渲染,人群孤獨(dú)的走著,地鐵似帶甲的生物安靜的行駛,天際遙遠(yuǎn),高空...
    阿西達(dá)娃閱讀 479評(píng)論 0 4
  • 什么是成長(zhǎng),所謂的成長(zhǎng)就是你看待事物的角度更加全面,漸漸的不再意氣用事,你會(huì)反省自己以前做的事情,會(huì)重新看待這些...
    木諾閱讀 263評(píng)論 0 0

友情鏈接更多精彩內(nèi)容