一、问题描述
启动springboot工程报错
Action:
Consider defining a bean of type 'com.xxx.xxx.dao.UserEntityMapper' in your configuration.
二、问题解决
1、首先检查有没有写错注解
2、添加注解
@Configuration
@EnableAutoConfiguration
@ComponentScan(basePackages = { "com.***" })
@SpringBootApplication
@MapperScan("com.****")
public class AoeSpringBootApplication {
public static void main(String[] args) {
SpringApplication.run(AoeSpringBootApplication.class, args);
}
}
更多推荐
SpringBoot 工程启动报错Consider defining a bean of type
发布评论