获取spring配置文件

读取Spring的配置文件applicationContext.xml的5种方法 1.利用ClassPathXmlApplicationContext,这种方式配置文件应该放在类包同路径下 Java代码: ApplicationContext ct=new ClassPathXmlApplicationContext("applicationContext01.xml"); ct.getBean(
相关文章
相关标签/搜索