springboot 开发过程中经常会有 could not autowire
很多都说在Autowired检查的级别即可,将Severity的级别从之前的 error 改为 warning 或者是其他可以忽略的级别,(我不想改)。
了解一种注解:@Component
一旦使用关于Spring的注解出现在类里,例如我在实现类中用到了@Autowired注解,被注解的这个类是从Spring容器中取出来的,那调用的实现类也需要被Spring容器管理,加上@Component
pring的注解形式:@Repository、@Service、@Controller,它们分别对应存储层Bean,业务层Bean,和展示层Bean。