Parrot 클래스는 다음과 같다.
public class Parrot {
private String name = "Koko";
private final Person person;
@Autowired
public Parrot(Person person) { ← 스프링은 Parrot 인스턴스를 생성하는 데 Person 빈이 필요하다.
this.person = person;
}
// 코드 생략
}