You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tylertreat edited this page Dec 31, 2012
·
2 revisions
The BeanPostProcessor allows for beans to be modified after they have been initialized by the container. BeanPostProcessor exposes a single method, postProcessBean. This method is invoked on every registered bean for all registered BeanPostProcessors after the bean definitions have been initialized and immediately before any BeanFactoryPostProcessor implementations have been called. BeanPostProcessors are useful for any situations where a particular bean or group of beans need to be altered or replaced based on certain conditions.
Example Implementation
Infinitum uses a BeanPostProcessor to resolve autowired dependencies in beans. Below is a slightly simplified fragment of that implementation with code excluded for brevity. Since BeanPostProcessors are special types of beans, they are registered with an InfinitumContext as normal.