今天报了一个错误
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘xx.XXXService’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
说我的bean注入不到spring容器中,首先检查了我的service上有没有注解@Service,发现是有的。然后试着在启动类上加了两个注解
@MapperScan("")、@ComponentScan(""),问题解决