Mapped Statements collection does not contain value for xxxx mybatis xml maven package install

Mapped Statements collection does not contain value for xxxx  

原因是 maven package的时候 src/main/java下面的xml文件没有拷贝进war包,导致部署到服务器上会出错

 

解决方法:

pom.xml 增加:

 1 <!-- Copy xml files to main output folder, because the compiler will not 
 2             copy files other than ".java". -->
 3         <resources>
 4             <resource>
 5                 <directory>src/main/java</directory>
 6                 <includes>
 7                     <include>**/*.xml </include>
 8                 </includes>
 9             </resource>
10             <resource>
11                 <directory>src/main/resources</directory>
12                 <includes>
13                     <include>*.xml </include>
14                     <include>*.properties </include>
15                 </includes>
16             </resource>
17         </resources>

增加在<build></bulid>里面

posted @ 2013-05-23 20:04  Shaman  阅读(311)  评论(0编辑  收藏  举报