CZT
2023-09-06 71c4fa1e27f75ae4b765c95c67a3069c84dc72ba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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;
        }
 
 
    }
}