package easydo.technology.listener;

import easydo.technology.components.JdbcClient;
import easydo.technology.enums.MESEnum;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.annotation.Profile;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import javax.sql.DataSource;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.List;

@Profile(value = "prod")
@Component
public class OpsTaskListener {
    @Resource
    JdbcClient jdbcClient;
    @Resource
    DataSource dataSource;

    @EventListener(ApplicationReadyEvent.class)
    public void onApplicationReady() throws Exception {
        System.out.println(">>>>>> 应用已完全就绪！执行任务初始化");
        try {

            System.out.println(">>>>>> 执行任务初始化完成");
        } catch (Exception e) {
            throw e;
        } finally {
        }

    }

}