首页>代码>Spring生命周期@PostConstruct和@PreDestroy的使用实例>/spring-lifecycle-postcontruct-predestroy-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();
    }
}
最近下载更多
最近浏览更多
444105047  LV6 2023年7月28日
kwm2921944  LV10 2021年6月16日
shiziliang  LV1 2021年6月14日
sherlockkkkkk  LV1 2021年6月11日
1304457666 2021年6月6日
暂无贡献等级
JavaLiuBing  LV3 2021年6月3日
骑着鱼儿过海的猫  LV1 2021年6月3日
xiao菜  LV2 2021年6月2日
月之氏族  LV23 2021年6月2日
avengo 2021年6月1日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友