package com.ningdatech.kqapi.common.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * <p>
 * WebProps
 * </p>
 *
 * @author WendyYang
 * @since 10:20 2024/5/30
 */
@Component
public class SystemProps {

    public static String webUrl;

    public static String servletContentPath;

    public static String getApiUrl() {
        return webUrl + servletContentPath;
    }

    @Value("${sys.web-url:}")
    public void setWebUrl(String webUrl) {
        SystemProps.webUrl = webUrl;
    }


    @Value("${server.servlet.context-path:}")
    public void setServletContentPath(String servletContentPath) {
        SystemProps.servletContentPath = servletContentPath;
    }

}
