public interface InitializingBean
An alternative to implementing InitializingBean is specifying a custom init-method, for example in an XML bean definition. For a list of all bean lifecycle methods, see the BeanFactory javadocs.
|Modifier and Type||Method and Description|
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
void afterPropertiesSet() throws java.lang.Exception
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
java.lang.Exception- in the event of misconfiguration (such as failure to set an essential property) or if initialization fails.