public interface DisposableBean
An alternative to implementing DisposableBean is specifying a custom
destroy-method, for example in an XML bean definition.
For a list of all bean lifecycle methods, see the
BeanFactory javadocs
.
AbstractBeanDefinition.getDestroyMethodName()
,
ConfigurableApplicationContext.close()
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Invoked by a BeanFactory on destruction of a singleton.
|