이런 구성으로 앱을 실행하면 다음과 같이 예외가 발생한다.
Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'parrot': Requested bean is currently in creation: Is there an unresolvable circular reference? at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.beforeSingletonCreation(DefaultSingletonBeanRegistry.java:347)
이 예외를 통해 스프링은 발생한 문제를 알려 주려고 한다. 예외 메시지는 매우 명확하다. 스프링은 순환 의존성과 상황을 야기한 클래스를 처리한다. 이런 예외를 발견할 때마다 예외에 지정된 클래스를 찾아 순환 의존성을 제거해야 한다.