【4】spring单元测试和ApplicationContext区别

来源:互联网 发布:apache drill 编辑:程序博客网 时间:2024/06/11 06:51
ApplicationContext 等于直接调用
public ClassPathXmlApplicationContext(String[] configLocations, boolean refresh, ApplicationContext parent)
   throws BeansException {
  super(parent);
  setConfigLocations(configLocations);
 if (refresh) {
  refresh();
 }
 }
junit  也是调用refresh()方法初始化
0 0
原创粉丝点击