It's a way to tell Spring there is some processing to be done before or after the initialization of a bean. This is achieved by implementing BeanPostProcessor.
public class DisplayNameBeanPostProcessor implements BeanPostProcessor { @Override public Object postProcessAfterInitialization(Object bean, String name) throws BeansException { System.out.println("After " + name + " initialization"); return arg0; } @Override public Object postProcessBeforeInitialization(Object bean, String name) throws BeansException { System.out.println("Before " + name + " initialization"); return arg0; } }
Copyright © 2013 Welcome to the website of Davis Fiore. All Rights Reserved.