1、注解来指定mapper接口所在的包
确认是否使用了启动类是否使用了@MapperScan
注解,或者mapper接口使用了@Mapper
2、检查Spring Boot配置
# application.yml
mybatis:
mapper-locations: classpath:mapper/*.xml
configuration:
map-underscore-to-camel-case: true #开启驼峰命名和下划线命名的自动转换
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl