No MyBatis mapper was found in xxx
SpringBoot 项目启动后输出了这样一个警告:WARN 8904 --- [ restartedMain] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.xxx]' package. Please check your configuration.很奇怪这个具体是在哪里配置的,
SpringBoot 项目启动后输出了这样一个警告:
WARN 8904 --- [ restartedMain] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.xxx]' package. Please check your configuration.
很奇怪这个具体是在哪里配置的,难道有默认配置?
个人通过以下方式配置的也生效了,可为什么还会出现这样一个警告呢?
@Bean
public SqlSessionFactory sqlSessionFactoryBean() throws Exception {
SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
sqlSessionFactoryBean.setDataSource(dataSource());
PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
sqlSessionFactoryBean.setMapperLocations(resolver.getResources("classpath:com/xxx/xxx/mapping/*Mapper.xml"));
sqlSessionFactoryBean.setTypeAliasesPackage("com.xxx.xxx.mapping");
return sqlSessionFactoryBean.getObject();
}
看到一段官方文档:

@SpringBootApplication 是一个方便的复合注解,它包含:@Configuration @EnableAutoConfiguration @EnableWebMvc @ComponentScan 等注解。
昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链
更多推荐


所有评论(0)