From 32d6b60497bfec452d4908a82c7a603bd7bb4c7c Mon Sep 17 00:00:00 2001 From: Parker Date: Fri, 17 Jun 2022 17:54:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7fastjson?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/opsli/core/general/StartPrint.java | 7 +++++-- pom.xml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/opsli-base-support/opsli-core/src/main/java/org/opsli/core/general/StartPrint.java b/opsli-base-support/opsli-core/src/main/java/org/opsli/core/general/StartPrint.java index e2fb052..5ffe075 100644 --- a/opsli-base-support/opsli-core/src/main/java/org/opsli/core/general/StartPrint.java +++ b/opsli-base-support/opsli-core/src/main/java/org/opsli/core/general/StartPrint.java @@ -20,6 +20,7 @@ import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Console; import cn.hutool.core.net.NetUtil; import cn.hutool.core.thread.ThreadUtil; +import cn.hutool.core.util.StrUtil; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.opsli.core.autoconfigure.properties.GlobalProperties; @@ -98,7 +99,8 @@ public class StartPrint { * @return String */ public String getBasePath(){ - return NetUtil.getLocalhostStr() + ":" + serverPort + serverContextPath; + return NetUtil.getLocalhostStr() + ":" + serverPort + + StrUtil.addPrefixIfNot(serverContextPath, "/"); } /** @@ -107,7 +109,8 @@ public class StartPrint { */ public String getRunTime(){ //Level.MINUTE表示精确到分 - return DateUtil.formatBetween(DateUtil.parseDateTime(starterDate), DateUtil.date(), BetweenFormatter.Level.MINUTE); + return DateUtil.formatBetween(DateUtil.parseDateTime(starterDate), + DateUtil.date(), BetweenFormatter.Level.MINUTE); } // ====================== diff --git a/pom.xml b/pom.xml index 38494bf..a1593c0 100644 --- a/pom.xml +++ b/pom.xml @@ -62,7 +62,7 @@ 2.3.3.RELEASE true - 1.2.75 + 1.2.83 3.4.0 1.3.0