From aed8969498eb8fc39f8b461104f05009fe8533e1 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期日, 26 九月 2021 15:37:40 +0800 Subject: [PATCH] remove 移除无用配置类 --- /dev/null | 32 -------------------------------- 1 files changed, 0 insertions(+), 32 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ServerConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ServerConfig.java deleted file mode 100644 index b5b7de3..0000000 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ServerConfig.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.ruoyi.framework.config; - -import javax.servlet.http.HttpServletRequest; -import org.springframework.stereotype.Component; -import com.ruoyi.common.utils.ServletUtils; - -/** - * 鏈嶅姟鐩稿叧閰嶇疆 - * - * @author ruoyi - */ -@Component -public class ServerConfig -{ - /** - * 鑾峰彇瀹屾暣鐨勮姹傝矾寰勶紝鍖呮嫭锛氬煙鍚嶏紝绔彛锛屼笂涓嬫枃璁块棶璺緞 - * - * @return 鏈嶅姟鍦板潃 - */ - public String getUrl() - { - HttpServletRequest request = ServletUtils.getRequest(); - return getDomain(request); - } - - public static String getDomain(HttpServletRequest request) - { - StringBuffer url = request.getRequestURL(); - String contextPath = request.getServletContext().getContextPath(); - return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(contextPath).toString(); - } -} -- Gitblit v1.9.3