首页>代码>Spring生命周期接口InitializingBean和DisposableBean的实例演示>/spring-lifecycle-initializing-disposable-bean-example/src/main/java/com/memorynotfound/spring/core/lifecycle/Run.java
package com.memorynotfound.spring.core.lifecycle;

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

public class Run {

    public static void main(String... args) throws InterruptedException {
        ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("app-config.xml");
        context.registerShutdownHook();
    }
}
最近下载更多
最代码官方  LV168 2021年2月24日
最近浏览更多
hihhhh  LV6 2023年3月17日
随缘而遇  LV2 2021年6月10日
是阿絮呀 2021年5月8日
暂无贡献等级
山海1234  LV10 2021年4月7日
dafeiyu  LV10 2021年4月6日
创世者  LV3 2021年3月29日
maixiaomai  LV6 2021年3月26日
那一丝涟漪  LV8 2021年3月22日
luyc123  LV6 2021年3月21日
喵小兵  LV10 2021年3月9日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友