From 0cd9098151f31a4b0cc0c5fe84f685929fc01117 Mon Sep 17 00:00:00 2001 From: davidhhuan Date: Fri, 7 May 2021 20:57:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=A4=9A=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E6=96=9C=E6=9D=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/metersphere/metersphere/issues/2509 --- .../io/metersphere/api/dto/definition/parse/Swagger2Parser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger2Parser.java b/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger2Parser.java index 439957f149..50f833182d 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger2Parser.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger2Parser.java @@ -77,7 +77,7 @@ public class Swagger2Parser extends SwaggerAbstractParser { parseParameters(operation, request); addBodyHeader(request); if (StringUtils.isNotBlank(basePath)) { - String pathStr = basePath + apiDefinition.getPath().replaceAll("//","/"); + String pathStr = (basePath + apiDefinition.getPath()).replaceAll("//","/"); apiDefinition.setPath(pathStr); request.setPath(pathStr); }