HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
📝
남득윤 학습 저장소
/
Spring Framework
Spring Framework
/
Core
Core
/
빈 생명주기와 콜백
빈 생명주기와 콜백
빈 생명주기와 콜백

빈 생명주기와 콜백

 
(싱글톤) 스프링 빈의 이벤트 라이프사이클
  1. 스프링 컨테이너 생성
  1. 스프링 빈 생성
  • 생성자 주입
 
  1. 의존관계 주입
  • 필드 주입, 세터 주입
 
  1. 초기화 콜백
  • implements InitializingBean → afterPropertiesSet
  • @Bean(initMethod = “myInitMethod“)
  • @PostConstruct
 
  1. 빈 사용
  1. 소멸전 콜백
  • implements DisposableBean → destroy
  • @Bean(destroyMethod = “myDestoryMethod“) + 추론기능 (close, shutdown)
  • @PreDestory
 
  1. 스프링 종료