MybatisAutoConfiguration.MapperScannerRegistrarNotFoundConfiguration matched:
今天用spring boot和mybatis做项目报以下错误:
==========================
CONDITION EVALUATION DELTA
==========================
Positive matches:
-----------------
MybatisAutoConfiguration.MapperScannerRegistrarNotFoundConfiguration matched:
- @ConditionalOnMissingBean (types: org.mybatis.spring.mapper.MapperFactoryBean; SearchStrategy: all) did not find any beans (OnBeanCondition)
Negative matches:
-----------------
None
Exclusions:
-----------
None
Unconditional classes:
----------------------
None
@SpringBootApplication
@MapperScan(basePackages = "com.neusoft.springboot.dao.mapper")
public class SpringbootApplication {
public static void main(String[] args) {
SpringApplication.run(SpringbootApplication.class, args);
}
}
添加一行:
@MapperScan(basePackages = "com.neusoft.springboot.dao.mapper")
就能成功运行了。