首页>代码>spring基于多个xml文件配置实现初始化bean的实例>/import-multiple-spring-xml-configuration-files/src/main/java/com/memorynotfound/spring/Run.java
package com.memorynotfound.spring;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Run {
public static void main(String... args){
ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"app-config.xml"});
CoffeeMachine coffeeMachine = context.getBean(CoffeeMachine.class);
coffeeMachine.makeCoffee("Java");
}
}
最近下载更多
shaoxf_nihao LV4
2022年6月6日
眉目成书 LV1
2021年1月5日
最近浏览更多
220611325
10月17日
暂无贡献等级
云间不羁客qq
5月26日
暂无贡献等级
xzg123456 LV6
2024年6月19日
quartz LV8
2024年3月13日
微信网友_6696101153525760
2023年10月17日
暂无贡献等级
小白会染色
2023年6月29日
暂无贡献等级
hedyyy LV3
2023年6月16日
Yz123456
2023年5月18日
暂无贡献等级
information LV2
2023年4月28日
xiaochen123123 LV1
2023年4月7日

