Properties props=new Properties();
props.load(Test. class. getClassLoader().getResourceAsStream("com/wr/duqu/abc.xml"));
String result =props.getProperty("AAA");
在有Spring包的情况下
BeanFactory f=new ClassPathXmlApplicationContext(”application. xml”);
Object o =f.getBean("v"); |
|