| | |
| | | package com.sandu.ximon.admin.config; |
| | | |
| | | import com.sandu.ximon.admin.utils.LogUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | |
| | | @Component |
| | | public class ServerConfig { |
| | | |
| | | @Value("${server-conf.ip}") |
| | | public String SIP; |
| | | @Value("${nginx.port}") |
| | | public String nginxPort; |
| | | @Value("${nginx.cameraSaveUrl}") |
| | | public String saveUrl; |
| | | // @Value("${broadcast.file-save-url}") |
| | | // private String fileSaveUrl; |
| | | |
| | | |
| | | private static String ServerIP; |
| | | private static String NginxPort; |
| | | private static String CameraSaveUrl; |
| | | private static String BroadcastFileSaveUrl; |
| | | private static boolean O2OServer; |
| | | |
| | | public static String getNginxCameraSaveUrl() { |
| | | return CameraSaveUrl; |
| | | } |
| | | |
| | | @PostConstruct |
| | | private void loadIP(){ |
| | | ServerIP = SIP; |
| | | NginxPort = nginxPort; |
| | | CameraSaveUrl = saveUrl; |
| | | // BroadcastFileSaveUrl = fileSaveUrl; |
| | | LogUtils.print("Server IP :" +SIP); |
| | | LogUtils.print("NignX Port :" +nginxPort); |
| | | LogUtils.print("Camera Save Url :" +CameraSaveUrl); |
| | | LogUtils.print("Broadcast File Save Url :" +BroadcastFileSaveUrl); |
| | | } |
| | | |
| | | public static String getServerIP(){ |
| | | public static String getServerIP() { |
| | | return ServerIP; |
| | | } |
| | | public static String getNignxPort(){ |
| | | return NginxPort; |
| | | } |
| | | public static String getBroadcastFileSaveUrl(){ |
| | | return BroadcastFileSaveUrl; |
| | | } |
| | | |
| | | } |