package com.yutou.bilibili.Tools;

import com.yutou.bilibili.services.SystemService;
import jakarta.annotation.Resource;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * 服务启动后执行
 */
@Component
public class ApplicationInit implements ApplicationRunner {
    @Resource
    SystemService systemConfigService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        Logger logger = Logger.getLogger("ApplicationInit");
        logger.log(Level.INFO, "服务启动后执行");
        systemConfigService.start();
    }

}
