[Feat] Core IoC 컨테이너 및 BeanFactory 계층 구조 구현#14
Merged
Conversation
- 싱글톤 인스턴스를 등록하고 조회하는 책임을 정의하는 SingletonRegistry 인터페이스 추가 - ConcurrentHashMap을 사용하여 실제 싱글톤 객체를 저장하는 DefaultSingletonBeanRegistry 구현
- 가장 기본적인 BeanFactory 인터페이스 정의 - 후처리기 등 고급 기능을 위한 AutowireCapableBeanFactory 인터페이스 정의 - getBean의 흐름을 제어하는 AbstractBeanFactory 추상 클래스 구현
빈 인스턴스화 로직을 분리하고 확장성 확보하기 위해 전략 패턴 적용 - InstantiationStrategy 인터페이스 정의 - JDK 리플렉션을 사용하는 SimpleInstantiationStrategy 구현체 추가
- PropertyValue: 단일 속성의 이름과 값을 저장 - PropertyValues: 여러 PropertyValue를 관리하는 컬렉션 - BeanReference: 다른 빈에 대한 참조를 나타냄
IoC 컨테이너의 AbstractAutowireCapableBeanFactory를 구현하여 BeanDefinition으로부터 실제 빈 인스턴스를 생성하는 로직을 작성합니다. - InstantiationStrategy를 사용하여 빈 인스턴스화 책임 위임 - populateBean, initializeBean 헬퍼 메서드를 통해 빈 생명주기 관리 - Aware, InitializingBean 등 생명주기 콜백 처리를 위한 인터페이스 및 로직 추가
…efinitionException 추가 - BeanDefinitionMap의 정보로 BeanFactory 타입 getBean 메소드 구현 - 유일한 빈을 찾지 못할 경우의 예외 정의
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 개요 (Overview)
📌 변경 사항 (Changes)
빈 메타데이터 정의
BeanFactory 계층 구조 설계 및 구현
빈 생성 전략 분리
생명주기 콜백 인터페이스 추가
✅ 테스트 방법 (Test Method)
📸 스크린샷 (Optional)