1、问题现象:ssm框架查询数据库时报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
2、问题原因:target目录下没有生成mapper.xml文件
3、解决方法:在pom文件中添加如下配置:
<build> <resources> <resource> <!-- 指定编译java目录下的xml文件--> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> <filtering>true</filtering> </resource> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.xml</include> </includes> <filtering>true</filtering> </resource> </resources> </build>