All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.luues.core.secondary.SystemInfo Maven / Gradle / Ivy

There is a newer version: 2.0.1.RELEASE
Show newest version
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();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy