1. 程式人生 > >【4】spring單元測試和ApplicationContext區別

【4】spring單元測試和ApplicationContext區別

ApplicationContext 等於直接呼叫 public ClassPathXmlApplicationContext(String[] configLocations, boolean refresh, ApplicationContext parent)    throws BeansException {   super(parent);   setConfigLocations(configLocations);  if (refresh) {   refresh();  }  } junit  也是呼叫refresh()方法初始化