项目启动时,mybatis报警信息如下:
[WARN] org.mybatis.spring.mapper.ClassPathMapperScanner.doScan(ClassPathMapperScanner.java:158)
No MyBatis mapper was found in ‘[com.XXX.XXX.mapper]‘ package. Please check your configuration.
原因:
org.mybatis.spring.mapper.MapperScannerConfigurer是扫描仓储类的接口,集成mybatis不是用接口方式实现的话,不需要配置
解决办法:
在applicationContext.xml中找到MapperScannerConfigurer的配置,删除即可
时间: 2024-10-29 03:27:04