@Test
public void test1(){
String config="applicationContext.xml";
//通过 类的存放路径
ApplicationContext cxt=new ClassPathXmlApplicationContext(config);
//通过 文件系统的路径
//ApplicationContext cx2=new FileSystemXmlApplicationContext(config);
SomeServer server= (SomeServer) cxt.getBean("server");
server.doSome(1,"asd");
}
网友评论