bug记录
A:问题的出现
Invalid bound statement (not found): com.tiyity.edu.mapper.EduCourseMapper.queryCourseConfirmInfo
B:问题的分析
class目录下没有找到和mapper对应的xml文件
c:如何解决
1.在parent项目的pom.xml文件添加
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
如果加了上面的配置依然没有在target的classes里面还是没有xml 需要rebuild一下
2.如果出现这个错误:‘mapperLocations’ was not specified or no matching resources found
在你所在微服务的application.properties里面添加
#application.properties配置扫描xml文件所在路径
mybatis-plus.mapper-locations=classpath:com/tiyity/edu/mapper/xml/*.xml
重启微服务基本就解决了