出现错误的可能是配置文件和mapper层或者dao层对不上
解决方法可能是:
接口的名字和映射文件的名字相同,接口中方法的名字和要调用的映射文件中的标签的id相同。
若同时使用注解和xml文件,又在使用mybatis-plus时需要注意,若正常配置mybatis mapper文件位置则也会出现该问题,原因是mybatis-plus中的MybatisPlusAutoConfiguration覆盖了mybatis的MybatisAutoConfiguration。
配置mybatis-plus.mapper-locations=classpath:mybatis/mapper/*.xml即可
SpingBoot 与Mybatis结合使用时出现Invalid bound statement (not found): xxx.xxx
于 2021-05-07 22:15:07 首次发布