使用@Autowired注解时被标红线,找不到bean,could not autowire,no beans of "XX"

使用@Autowired注解时报错,could not autowire,no beans of "XX",是因为你没有写@Service和@Repository这些注解在相应的Java类中,其中注意@Service要注解在实现类中,而不是写在接口

原文地址:https://www.cnblogs.com/chaara/p/14549402.html