首页>代码>Spring通过properties文件的配置实现bean初始化的简单示例>/spring-property-placeholder-example/src/main/java/com/memorynotfound/Main.java
package com.memorynotfound;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

    public static void main(String... args){
        ApplicationContext context = new ClassPathXmlApplicationContext("app-config.xml");
        Course course = context.getBean(Course.class);

        System.out.println(course);
    }
}
最近下载更多
最近浏览更多
遗留问题  LV2 2023年6月9日
井水清  LV3 2021年6月4日
sleary  LV3 2021年5月4日
liuqingfang  LV4 2021年4月2日
skystory  LV11 2021年3月31日
ernghjm  LV5 2021年3月18日
zzhua195  LV6 2021年2月5日
wlgqfy  LV1 2021年1月15日
zdm_3366  LV3 2021年1月11日
hhh888 2021年1月9日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友