可以
ClassPathXmlApplicationContext ctx1 = new ClassPathXmlApplicationContext(“context1.xml”);
ClassPathXmlApplicationContext ctx2 = new ClassPathXmlApplicationContext(“context2.xml”);

可以
ClassPathXmlApplicationContext ctx1 = new ClassPathXmlApplicationContext(“context1.xml”);
ClassPathXmlApplicationContext ctx2 = new ClassPathXmlApplicationContext(“context2.xml”);