org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.misaki.mapper.UserMapper'
时间:2020-08-21 15:12:35
收藏:0
阅读:230
报错:找不到对应Mapper
原因:当时使用Springboot+MybatisPlus代码生成器,直接就启动了,算是一个小失误
解决:在Springboot启动项上添加@MapperScan注解,或者在每个Mapper上添加@Mapper注解
@MapperScan(basePackages = "com.misaki.mapper") @SpringBootApplication public class TestApplication { public static void main(String[] args) { SpringApplication.run(TestApplication.class, args); } }
原文:https://www.cnblogs.com/osaka/p/13540556.html
评论(0)