@FunctionalInterface public interface BeanFactoryPostProcessor
Useful for custom config files targeted at system administrators that
override bean properties configured in the application context. See
PropertyResourceConfigurer and its concrete implementations for
out-of-the-box solutions that address such configuration needs.
BeanFactoryPostProcessor may interact with and modify bean
definitions, but never bean instances. Doing so may cause premature bean
instantiation, violating the container and causing unintended side-effects.
If bean instance interaction is required, consider implementing
beans in its bean definitions and applies them before any other beans get created.
BeanFactoryPostProcessor may also be registered programmatically
BeanFactoryPostProcessor beans that are autodetected in an
ApplicationContext will be ordered according to
Ordered semantics. In contrast,
BeanFactoryPostProcessor beans that are registered programmatically
ConfigurableApplicationContext will be applied in the order of
registration; any ordering semantics expressed through implementing the
Ordered interface will be ignored for
programmatically registered post-processors. Furthermore, the
@Order annotation is not
taken into account for
void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException
beanFactory- the bean factory used by the application context
BeansException- in case of errors