
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'forecastServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.baomidou.mybatisplus.mapper.BaseMapper com.baomidou.mybatisplus.service.impl.ServiceImpl.baseMapper; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.baomidou.mybatisplus.mapper.BaseMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} 实在不知道哪里错了,求助大家帮搜搜
2 fooving 2019 年 7 月 3 日 |
3 tudouxiong 2019 年 7 月 3 日 via Android 上 stackoverflow 求助 上 V2EX 求助 |
4 wc951 2019 年 7 月 3 日 via Android 这和 mybatis 有什么关系,这不就是 spring 注入失败了吗 |
5 cway OP |
7 cluulzz 2019 年 7 月 3 日 |
8 MotherShip 2019 年 7 月 4 日 这是 Mybatis Plus 把 你说 SBoot 可以 SSM 不行,估计是少了什么 starter 中的配置,没配包扫描之类的。。 |
9 cway OP |
10 hafuhafu 2019 年 7 月 9 日 入口类上加注解 @MapperScan(mapper 包名) 大概 |
11 lavvrence 2019 年 7 月 19 日 BaseMapper 打上 @Repository 或者 @Mapper 看看 |