com.luues.core.secondary.SystemInfo Maven / Gradle / Ivy
package com.luues.core.secondary;
/**
* 获取项目启动后的ip,端口等
*/
public class SystemInfo {
private static String host;
private static Integer port;
private static String contextPath;
private static String active;
public SystemInfo(String host, Integer port, String contextPath, String active){
SystemInfo.host = host;
SystemInfo.port = port;
SystemInfo.contextPath = contextPath;
SystemInfo.active = active;
}
public static String getHost() {
return host;
}
public static Integer getPort() {
return port;
}
public static String getContextPath() {
return contextPath;
}
public static String getActive() {
return active;
}
public static String value(){
return "http://" + getHost() + ":" + getPort() + "/" + getContextPath();
}
}