如果你的目录结构跟我一样,dao和xml在一起,报错 Invalid bound statement (not found): com.xxx
。按照如下解决问题:
1.在pom.xml里面添加如下代码:
<!--编译打包过虑配置-->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
2.在application.yml文件下添加如下信息:
mapper-locations: classpath*:com/qrda/**/mapper/*.xml