BeanPostProcessor接口有两个方法: public Object postProcessBeforeInitialization(Object arg0, String arg1) ,这是bean在加载前执行的方法。public Object postProcessAfterInitialization(Object arg0, String arg1),这是bean在加载后执行的方法。