카테고리 없음
Spring Life Cycle Init Destory Using Annotation
노랑파자마
2018. 3. 30. 14:32
Spring Bean 생성과 소멸시 Method 를 정의 할 수 있다. 기본 Xml 설정파일을 통해 init-method 와 destory-method 구성을 할 수 있다. 그들은 Spring Bean life Cycle 의 일부 이다. 초기화 Method 는 Bean 생성 직후 호출되어지며 소멸 Method 는 killing the Bean 전에 호출된다. 하지만 열거한 interface 를 통한 Callback Method 를 사용하는것은 권장하지 않는다. 대신 Xml 설정을 통해 구현하는데 훨신 유연하기 때문이다.
:https://github.com/pratikdimble/Spring_Life_Cycle_Init_Destroy_Using_Annotation
:http://nrhan.tistory.com/entry/Spring-Bean-Life-Cycle