- 检查包名与接口名是否一致,如果不一致请修改;
- 检查resources文件夹是否设置为资源文件夹;
- 在pom.xml下添加如下代码:
<!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 --> <build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources> </build>
一般这个错误都是因为细节上出了问题,程序编写是一项技术活一定要细心!!定要细心!!要细心!!细心!!
无效的绑定声明(未找到)包名.mapper.XXXMapper
最新推荐文章于 2024-08-13 14:24:30 发布