SpringBoot加这个注解@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})

 关闭特定的自动配置,导致mapper文件不能注入系统,会报下面的错误信息:

SpringBoot项目中mapper依赖不到


Description:

Field userPOMapper in com.project.manage.service.impl.LoginServiceImpl required a bean of type 'com.project.manage.mapper.UserPOMapper' that could not be found.

Action:

Consider defining a bean of type 'com.project.manage.mapper.UserPOMapper' in your configuration.



相关文章: