Spring Boot启动时出现WARN:No MyBatis mapper was found in

今天发现spring-boot继承mybatis启动时老是出现WARN:

org.mybatis.spring.mapper.ClassPathMapperScanner - No MyBatis mapper was found in ‘[com.aaa.bbb]‘ package. Please check your configuration.

使用的tk的开源项目进行mybatis集成

查了好多解决方案但是没生效,最后在一篇文章中看到:

doScan()会扫描启动类同级目录下的mapper接口,但是合理的目录结果绝对不允许所有的mapper都在启动类目录下

所以在启动类目录下添加了一个伪mapper

NoWarnMapper.java

Spring Boot启动时出现WARN:No MyBatis mapper was found in

重新启动服务,warn信息消失

 

Spring Boot启动时出现WARN:No MyBatis mapper was found in

上一篇:在Windows电脑直接申请iOS开发证书p12及.mobileprovision


下一篇:简易封装的axios