Spring Lifecycle Callbacks Explained
The methods of Spring lifecycle callbacks are implemented by implementing the methods of the InitializingBean and DisposableBean interfaces.
The method in the InitializingBean interface is called afterPropertiesSet(), and it is invoked after all properties of the bean have been set.
The method in the DisposableBean interface is called destroy(), and it is invoked before the Bean is destroyed.