InitializingBean,spring 的一个接口,实现该接口的bean,spring在初始化的时候会调用其afterPropertiesSet()方法
[java]
view plain
copy
@Component public class initBean implements InitializingBean{ @Override public void afterPropertiesSet() throws Exception { System.out.println("-----initBean.afterPropertiesSet(); init...bean--"); } }
转载于:http://blog.csdn.net/u013614451/article/details/41419355