public class LifecycleBeanPostProcessor extends Object implements org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor, org.springframework.core.PriorityOrdered
Constructable.init() and
Destroyable.destroy() for every bean that implements these
interfaces. In contrast to the PostConstruct and
PreDestroy annotations, these methods will also be
called if they are declared in a super class of the bean.
This postprocess will be called at the same stages,
CommonAnnotationBeanPostProcessor would be called:
Constructor
Bean-Injections
Settings-Injections
init()
...
destroy()Constructable,
Destroyable| Constructor and Description |
|---|
LifecycleBeanPostProcessor() |
| Modifier and Type | Method and Description |
|---|---|
int |
getOrder() |
Object |
postProcessAfterInitialization(Object bean,
String beanName) |
void |
postProcessBeforeDestruction(Object bean,
String beanName) |
Object |
postProcessBeforeInitialization(Object bean,
String beanName) |
boolean |
requiresDestruction(Object bean) |
void |
setOrder(int order) |
public int getOrder()
getOrder in interface org.springframework.core.Orderedpublic void setOrder(int order)
public Object postProcessAfterInitialization(Object bean, String beanName)
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessorpublic void postProcessBeforeDestruction(Object bean, String beanName)
postProcessBeforeDestruction in interface org.springframework.beans.factory.config.DestructionAwareBeanPostProcessorpublic Object postProcessBeforeInitialization(Object bean, String beanName)
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessorpublic boolean requiresDestruction(Object bean)
requiresDestruction in interface org.springframework.beans.factory.config.DestructionAwareBeanPostProcessorCopyright © 2015–2020 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.