Maven建立SSM專案 啟動時報錯Mapped Statements collection does not contain value for xxx
問題:Maven建立SSM專案 啟動時報錯Mapped Statements collection does not contain value for xxx
經過檢查發現Mapper.xml名稱空間沒寫錯,註解沒有少,自動掃描包也正常,但是仍然報錯
解決方案:Maven中需要新增resource標籤,resources標籤中指定對映檔案路徑,否則xml對映檔案以及資原始檔不會被Maven載入!
貼程式碼:
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
問題成功解決,希望本篇文章可以幫助到需要的人哈,轉載註明出處!
相關文章
- java.lang.IllegalArgumentException: Mapped Statements collection does not contain value forJavaExceptionAPPAI
- editor does not contain a main type Maven專案AIMaven
- mybatis(錯誤) 專案啟動時報“Result Maps collection already contains value forxxx”的解決方案MyBatisAI
- 解決mybatis出現Mapped Statements collection already contains value for問題MyBatisAPPAI
- 建立Maven專案出錯Maven
- 啟動網路卡時報:does not seem to be present
- 建立Maven專案出錯 pom出錯Maven
- value xxx for the flexfield segment customer:does not exist in the value set xxxxFlex
- Maven專案報錯:No bean named 'xxxxxx' availableMavenBeanAI
- spring boot 啟動時報錯The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized orJDBC driverSpring BootServerZedJDBC
- Maven建立專案遇到導包錯誤:Maven
- Result Maps collection already contains value for xxx.xxx.dao.BaseResultMap錯誤AI
- idea ssm maven專案搭建筆記IdeaSSMMaven筆記
- Maven專案Spring Boot啟動MavenSpring Boot
- Composer 建立專案時報錯的一點經歷
- 建立Maven模板專案Maven
- maven 建立web專案MavenWeb
- Maven建立Java專案MavenJava
- PL/SQL Developer啟動時報錯,Initialization error could not load xxxx\oci.dllSQLDeveloperError
- 練習專案npm start啟動時報錯的個人解決辦法NPM
- 分模組的maven專案除錯時報Source not found的解決辦法Maven除錯
- 【小白第一篇】maven搭建ssm專案MavenSSM
- 如何用Maven建立web專案MavenWeb
- maven 專案的建立入門Maven
- SSM(十) 專案重構-網際網路專案的Maven結構SSMMaven
- QT中error: xxx does not name a type xxx錯誤QTError
- 用maven建立專案及maven常用命令Maven
- SpringBoot專案建立與第一個SSM專案示例Spring BootSSM
- 整合SSM框架,啟動時報錯java.lang.NoClassDefFoundError: org/codehaus/jackson/JsonProcessingExceptionSSM框架JavaErrorJSONException
- Maven建立Web應用程式專案MavenWeb
- Maven+myeclipse 建立聚合專案MavenEclipse
- Maven通過命令建立web專案MavenWeb
- 使用maven2快速建立專案Maven
- tomcat啟動 ssm專案出現亂碼的解決TomcatSSM
- Eclipse中執行出現selection does not contain a main type錯誤EclipseAI
- netca 啟動時報錯(Segmentation fault(coredump))Segmentation
- Springboot建立maven多模組專案Spring BootMaven
- springboot專案啟動報錯Spring Boot