初始化容器编写的类

public interface Initializer {
    public  void initial();
}
 
public class InitialContainer implements Initializer {
	private static Log log = LogFactory.getLog(InitialContainer.class);
	public List<Initializer> initList = null;

	public InitialContainer(List<Initializer> initList) {
		this.initList = initList;
	}

	public void initial() {
		log.info("系统初始化--开始!");
		for(Initializer initializer: initList)
		{
			initializer.initial();
		}
		log.info("系统初始化--结束!");
	}	
}

 

你可能感兴趣的:(初始化)