SpringBoot项目启动报错XXXDao.java 找不到

第一点

检查dao层接口中是否写了@Mapper注解
在这里插入图片描述

第二点

检查是否在BootdoApplication中注册
@MapperScan(“com.cxt.*.dao”)

@EnableTransactionManagement
@ServletComponentScan
@MapperScan("com.cxt.*.dao")
@SpringBootApplication
@EnableCaching
public class BootdoApplication {
    public static void main(String[] args) {
        SpringApplication.run(BootdoApplication.class, args);
}
发布了5 篇原创文章 · 获赞 1 · 访问量 133

猜你喜欢

转载自blog.csdn.net/Q_Q104926/article/details/105042397