Spring自动装配----注解装配----Spring自带的@Autowired注解 父类 package cn.ychx; public interface Person { public void sayHello(); } 学生子类 package cn.ychx; public class Student implements Person { @Override public void sayHello() { System.out.println("Hello! My name i…