mybatis启动报错

***************************
APPLICATION FAILED TO START
***************************

Description:

Field vmCoursewarMapper in com.tms.thirdparty.service.impl.VmCoursewarServiceImpl required a bean of type 'com.tms.thirdparty.dao.VmCoursewarMapper' that could not be found.

The injection point has the following annotations:
    - @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'com.tms.thirdparty.dao.VmCoursewarMapper' in your configuration.


Process finished with exit code 1

 之前application配置

@SpringBootApplication
@ComponentScan(basePackages = "com.tms")

修改以后好了

@ComponentScan(basePackages = {"com.tms.thirdparty.dao"})
原文地址:https://www.cnblogs.com/lixxx/p/11052924.html