ClassPathXmlApplicationContext(String configLocation)
引數說明:ClassPathXmlApplicationContext context; context = new ClassPathXmlApplicationContext("appContext.xml");
ClassPathXmlApplicationContext(String[] configLocations)
引數說明:public static void main(String[] args){ String[] locations = {"appContext.xml","daoConfig.xml","viewConfig"}; //定義儲存組態檔的字串陣列 ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(locations); //載入組態檔 }