springboot集成mybatis-plus报mapper找不到
No qualifying bean of type ‘com.zcs.mapper.SysUserMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations。
首先想到的是,**Mapper.xml的扫描路径不对,然后仔细检查了下,是对的,
解决:可以在@ComponentScan(basePackages = “com.zcs.mapper”)加该注解,还有的是说可以在mapper上加@Mapper注解,最后我是通过在启动类上加注解解决的,特地记录下,防止后面再出现改错
记录springboot整合mybatis
最新推荐文章于 2023-06-01 16:06:57 发布