| New file |
| | |
| | | package com.zy.acs.manager.common.config; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.net.InetAddress; |
| | | import java.net.UnknownHostException; |
| | | |
| | | /** |
| | | * 上游服务系统配置 |
| | | * Created by luxiaotao on 2018/10/15 |
| | | */ |
| | | @Data |
| | | @Configuration |
| | | @ConfigurationProperties(prefix = "uplink") |
| | | public class UplinkProperties { |
| | | |
| | | public static String HOST_NAME; |
| | | |
| | | static { |
| | | try { |
| | | HOST_NAME = InetAddress.getLocalHost().getHostName(); |
| | | } catch (UnknownHostException e) { |
| | | System.err.println("find hostname err"); |
| | | } |
| | | } |
| | | |
| | | private Boolean enabled; |
| | | |
| | | private String host; |
| | | |
| | | private Integer port; |
| | | |
| | | private String url; |
| | | |
| | | // millisecond |
| | | private Integer timeout = 60 * 1000; |
| | | |
| | | } |