목록Web/스프링 (1)
kaka09
스프링(spring) 빈 생명주기
사용법 ..... implements InitializingBean, DisposableBean{...} InitializingBean= 빈 초기화 과정에 호출( ctx.refresh() 과정에서 호출됨) @Overridepublic void afterPropertiesSet() thorws Exception {} DisposableBean= 빈 소멸과정에 호출( ctx.close() 과정에서 호출됨) @overridepublic void destroy() throws Exception{} 다른 사용법 @PostConstruct # 빈 초기화 과정에 호출 ( ctx.refresh() 과정에서 호출됨)public void initMethod(){} @PreDestroy # 빈 소멸과정에 호출 ( ctx.c..
Web/스프링
2017. 9. 2. 20:03