HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🤩
개발
/
Spring
Spring
/
🎧
Spring Framework 핵심개념(Core)
/
🪣
Dependency Resolution Process
🪣

Dependency Resolution Process

Dependency Resolution Process

  1. ApplicationContext 가 Configuration metada와 함께 초기화 되고 생성됨
  1. 각각의 빈 별로 그것의 의존성은 아래와 같은 방법으로 표기됨
    1. form of properties
    2. constructor arguments
    3. arguments to the static-factory method
  1. 각각의 property와 constructor argument 는 실제로 정의를 함으로써 값을 넣거나 container 안에서의 다른 bean 에대한 참조로 resolution 이 진행됨
  1. 각각의 property와 constructor argument는 명시된 format으로 부터 실제 타입으로 전환됨

Circular dependencies

class A{ private final B b; A(B b){ this.b = b; } } class B { private final A a; B(A a) { this.a = a; } } @Configuration class CircularConfig{ @Bean public A a(B b){ return new A(b); } @Bean public B b(A a){ return new B(a); } }