package com.ho.common.tools.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * 容器启动完成
 */
@Component
public class ContainerStarted implements CommandLineRunner {
    //环境信息
    @Value("${spring.profiles.active}")
    private String env;

    private Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public void run(String... args) {
        logger.info(">>>>>>>>>>>>>>>容器启动完成<<<<<<<<<<<<<");
        logger.info(">>>>>>>>>>>>>>>当前环境: " + env);
    }
}
