获取spring里的bean

ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring.xml");

ClassPathXmlApplicationContext    可以用来读取xml文件