使用Maven构建SSM时, 需要在pom.xml中配置一些信息, 否则mapper.xml就无法被扫描到, 程序就会抛invalid bound statement (not found)异常
解决办法: 将下面配置添加到pom.xml文件中
1 <build> 2 <resources> 3 <resource> 4 <directory>src/main/java</directory> 5 <includes> 6 <include>**/*.properties</include> 7 <include>**/*.xml</include> 8 </includes> 9 <filtering>false</filtering> 10 </resource> 11 <resource> 12 <directory>src/main/resources</directory> 13 <includes> 14 <include>**/*.properties</include> 15 <include>**/*.xml</include> 16 </includes> 17 <filtering>false</filtering> 18 </resource> 19 </resources> 20 </build>