Spring注解驱动开发-扩展原理之009-Spring容器刷新第九步-onRefresh()

目录

 9、onRefresh();留给子容器(子类)


 9、onRefresh();留给子容器(子类)

/**
 * Template method which can be overridden to add context-specific refresh work.
 * Called on initialization of special beans, before instantiation of singletons.
 * <p>This implementation is empty.
 * @throws BeansException in case of errors
 * @see #refresh()
 */
//子类重写这个方法,在容器刷新的时候可以自定义逻辑
protected void onRefresh() throws BeansException {
	// For subclasses: do nothing by default.
}

 


版权声明:本文为Choco1ove原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。