首页>代码>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日
最近浏览更多
quartz  LV7 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日
irivn007  LV15 2022年12月24日
阿沅的花与草  LV7 2022年12月9日
拔刀斋  LV2 2022年9月28日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友