From 6061e7787b3975b62a2d733e795ca3dbafdd7e20 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 12 Mar 2024 18:07:30 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E6=98=BE=E7=A4=BAmock=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E7=9A=84url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/service/CreateEnvironmentResourceService.java | 1 + .../java/io/metersphere/project/service/EnvironmentService.java | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/CreateEnvironmentResourceService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/CreateEnvironmentResourceService.java index a118e5da91..e50c4dcdf6 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/CreateEnvironmentResourceService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/CreateEnvironmentResourceService.java @@ -63,6 +63,7 @@ public class CreateEnvironmentResourceService implements CreateProjectResourceSe if (CollectionUtils.isEmpty(httpConfigs)) { HttpConfig httpConfig = new HttpConfig(); httpConfig.setHostname(StringUtils.join(baseUrl, MOCK_EVN_SOCKET, project.getNum())); + httpConfig.setDescription("根据系统配置的当前站点自动生成"); httpConfigs.add(httpConfig); } } diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/EnvironmentService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/EnvironmentService.java index 7ad83a5cce..c5d6b77ec6 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/EnvironmentService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/EnvironmentService.java @@ -203,6 +203,7 @@ public class EnvironmentService extends MoveNodeService { if (StringUtils.isNotEmpty(baseUrl)) { Project project = projectMapper.selectByPrimaryKey(environment.getProjectId()); environmentInfoDTO.getConfig().getHttpConfig().getFirst().setHostname(StringUtils.join(baseUrl, MOCK_EVN_SOCKET, project.getNum())); + environmentInfoDTO.getConfig().getHttpConfig().getFirst().setUrl(StringUtils.join(baseUrl, MOCK_EVN_SOCKET, project.getNum())); } } }