1、自动化装配bean 组件装配:Spring会自动发现应用上下文所创建的bean。 自动装配:Spring自动满足bean之间的依赖 在类上加入@Component注解,告诉spring为这个类创建bean 使用@Autowired注解……