1.第一种,使用数组
代码
applicationcontext contex=new classxmlapplicationcontext(bew string["a1.xml","a2.xml"]);
2.第二种,只用通配符
代码
applicationcontext contex=new classxmlapplicationcontext("a*.xml");
//但此种方法只对文件系统中的xml文件有效,针对jar包中的无效
3.第三种,引入
代码
applicationcontext contex=new classxmlapplicationcontext("a1.xml");
//在a1.xml中
闽公网安备 35060202000074号