ClassPathXmlApplicationContext 1 2 3 public ClassPathXmlApplicationContext(String configLocation) throws BeansException { this(new String[] {configLocation}, true, null); } 1 2 3 4 5 6 7 8 9 10 11 public ClassPathXmlApplicationContext( String[] configLocations, boolean refresh, @Nullable ApplicationContext parent) throws BeansException { super(parent); // 遍历configLocations,处理每一个元素,替换其