2021与蓝度共同重构项目,服务端
liuhaonan
2022-11-07 ddfbc40f9ca8546a2c34865abef51630f054d5e9
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
package com.sandu.ximon.admin.config;
 
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
 
/**
 * @author LiuHaoNan
 * @date 2022/9/26
 */
@Component
public class BroadcastIP implements InitializingBean {
 
 
    private static  String SERVER;
 
    @Value("${broadcastApi.serviceUrl}")
    private String server;
 
    @Override
    public void afterPropertiesSet() throws Exception {
        SERVER = server;
    }
 
    public static String getServerIP() {
        return SERVER;
    }
}