springboot 整合mybatis报错 required a bean of type '**' that could not be found

解决办法springboot启动类添加扫描注解(红色字体)

@SpringBootApplication
@MapperScan("com.cloudtop.springbootmybatis.mapper")
public class SpringbootMybatisApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootMybatisApplication.class, args);
    }

}
发布了51 篇原创文章 · 获赞 18 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/m0_37882063/article/details/88949543