Springboot+mybatisplus项目报错
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.itheima.dao.UserDao’ available: expected at least 1 bean which qualifies as autowire candidate.
网上的方法都试过了,启动类 SpringBootApplicatio上加@MapperScan、dao接口上加了@Mapper都没有用
我的依赖版本
JDK:17
spring-boot-starter-parent:3.1.2
mybatis-plus-boot-starter:3.4.3
解决方法:
mybatis-plus-boot-starter改成3.5.3
具体原因本人不知,有大神知道的话请不吝赐教,感谢!