diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/dto/UserLocalConfigUpdateRequest.java b/backend/services/system-setting/src/main/java/io/metersphere/system/dto/UserLocalConfigUpdateRequest.java index c80549717c..7a7864f493 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/dto/UserLocalConfigUpdateRequest.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/dto/UserLocalConfigUpdateRequest.java @@ -6,21 +6,22 @@ import jakarta.validation.constraints.Size; import lombok.Data; import lombok.EqualsAndHashCode; +import java.io.Serial; import java.io.Serializable; @Data @EqualsAndHashCode(callSuper = false) public class UserLocalConfigUpdateRequest implements Serializable { + @Serial private static final long serialVersionUID = 1L; @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{user_local_config.id.not_blank}") private String id; - @Schema(description = "本地执行程序url", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{user_local_config.user_url.not_blank}") - @Size(min = 1, max = 50, message = "{user_local_config.user_url.length_range}") + @Schema(description = "本地执行程序url") + @Size( max = 50, message = "{user_local_config.user_url.length_range}") private String userUrl; diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/UserLocalConfigControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/UserLocalConfigControllerTests.java index 14677d6692..4f2af6ed63 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/UserLocalConfigControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/UserLocalConfigControllerTests.java @@ -96,10 +96,6 @@ public class UserLocalConfigControllerTests extends BaseTest { //不存在的 request.setId(UUID.randomUUID().toString()); requestPost(UPDATE, request, status().is5xxServerError()); - //url为空 - request.setId(userLocalConfig.getId()); - request.setUserUrl(""); - requestPost(UPDATE, request, status().is4xxClientError()); //id为空 request.setId(""); request.setUserUrl("https://www.baidu.com"); diff --git a/frontend/src/components/business/ms-personal-drawer/components/localExec.vue b/frontend/src/components/business/ms-personal-drawer/components/localExec.vue index b0be943e5e..c68f75f2a9 100644 --- a/frontend/src/components/business/ms-personal-drawer/components/localExec.vue +++ b/frontend/src/components/business/ms-personal-drawer/components/localExec.vue @@ -25,16 +25,28 @@ @press-enter="testApi" >