In this post under Spring Core, I will explain with example how to register initialization and destroy methods for a bean. FYI, a bean initialization method is called when the bean is created and destroy method is called before bean is garbage collected. All we need to tell Spring is which are the initialization and…… Continue reading Registering init and destroy methods using @Bean annotation