首页>代码>spring基于xml文件配置实现初始化bean的实例>/spring-xml-based-configuration-example/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"); } }
最近下载更多
littlejuck LV2
2023年6月11日
最近浏览更多
littlejuck LV2
2023年6月11日
lunkuokuo LV2
2023年5月8日
13732710091
2023年4月3日
暂无贡献等级
专打不服之徒 LV3
2023年3月22日
阿沅的花与草 LV7
2022年12月9日
200171 LV9
2021年6月26日
syy001005 LV7
2021年6月23日
925902118
2021年6月17日
暂无贡献等级
guhongfeiyu
2021年5月11日
暂无贡献等级
ytthhh LV3
2021年4月16日