今天重新搭建SpringBoot项目融合MybatisPlus遇到一个问题“org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)”,这个问题是MybatisPlus没有扫描到mappers.xml引起的,解决方法如下:
@MapperScan("com.package.mapper")
,这个是指向src目录中的mapper而非mapper.xmlmapper-locations: classpath:/mapper/*Mapper.xml
,注意是 xxx/xxx/*Mapper.xml 而不是 xxx.xxx.xxxmybatis-plus-boot-starter
原文:https://www.cnblogs.com/liaoweiming/p/13904725.html