package com.ld.igds.run;
|
|
import com.ld.igds.data.ConfigData;
|
import com.ld.igds.weather.WeatherServerEngine;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.boot.CommandLineRunner;
|
import org.springframework.core.annotation.Order;
|
import org.springframework.stereotype.Component;
|
|
|
/**
|
* @Desc: 服务启动配置
|
* @author: Andy
|
* @update-time: 2023/4/24
|
*/
|
@Component(ServerRunner.BEAN_ID)
|
@Order(value = 23)
|
public class ServerRunner implements CommandLineRunner {
|
|
public static final String BEAN_ID = "inte.serverRunner";
|
|
@Autowired
|
private ConfigData configData;
|
|
@Override
|
public void run(String... strings) throws Exception {
|
|
|
if (configData.getActive().equals("dev")) {
|
WeatherServerEngine.start();
|
return;
|
}
|
|
if (configData.getActive().indexOf("pro") >= 0) {
|
WeatherServerEngine.start();
|
return;
|
}
|
|
|
}
|
}
|