package com.fdkankan.ucenter.common.constants;

import org.apache.commons.lang3.StringUtils;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class NacosProperty {

    public static String bucket;
    public static String host;
    public static String endPoint;
    public static String uploadType;
    public static String activeFile;
    private static String mainUrl;

    public static String getMainUrl() {
//        if(StringUtils.isBlank(mainUrl)){
//            try {
//                return InetAddress.getLocalHost().getHostAddress() +"/";
//            } catch (UnknownHostException e) {
//                e.printStackTrace();
//            }
//        }
        return mainUrl;
    }

    public static void setMainUrl(String mainUrl) {
        NacosProperty.mainUrl = mainUrl;
    }
}
