package cn.reghao.oss.console.config.spring;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import java.io.IOException;

/**
 * @author reghao
 * @date 2019-09-26 17:22:16
 */
@Slf4j
@Component
public class AppLifecycle implements ApplicationRunner, DisposableBean {
    @Override
    public void run(ApplicationArguments args) throws IOException {
        log.info("oss-console started");
    }

    @Override
    public void destroy() {
        log.info("oss-console shutdown...");
    }
}
