diff --git a/modules/server/src/main/java/io/jpom/controller/build/BuildInfoController.java b/modules/server/src/main/java/io/jpom/controller/build/BuildInfoController.java index 3f8f888c6..ae03da212 100644 --- a/modules/server/src/main/java/io/jpom/controller/build/BuildInfoController.java +++ b/modules/server/src/main/java/io/jpom/controller/build/BuildInfoController.java @@ -180,12 +180,11 @@ public class BuildInfoController extends BaseServerController { } // 检查关联数据ID buildInfoModel.setReleaseMethodDataId(jsonObject.getString("releaseMethodDataId")); + // 设置属性 + buildInfoModel.setReleaseMethod(releaseMethod1.getCode()); if (buildInfoModel.getReleaseMethod() != BuildReleaseMethod.No.getCode()) { Assert.hasText(buildInfoModel.getReleaseMethodDataId(), "没有发布分发对应关联数据ID"); } - - // 设置属性 - buildInfoModel.setReleaseMethod(releaseMethod1.getCode()); buildInfoModel.setExtraData(jsonObject.toJSONString()); // 新增构建信息 diff --git a/modules/server/src/main/java/io/jpom/controller/build/RepositoryController.java b/modules/server/src/main/java/io/jpom/controller/build/RepositoryController.java index 596390482..1277086b9 100644 --- a/modules/server/src/main/java/io/jpom/controller/build/RepositoryController.java +++ b/modules/server/src/main/java/io/jpom/controller/build/RepositoryController.java @@ -77,6 +77,7 @@ public class RepositoryController extends BaseServerController { pageResult.forEach(repositoryModel -> { // 隐藏密码字段 repositoryModel.setPassword(null); + repositoryModel.setRsaPrv(null); }); JSONObject jsonObject = JsonMessage.toJson(200, "获取成功", pageResult); jsonObject.put("total", pageResult.getTotal()); diff --git a/modules/server/src/main/java/io/jpom/model/data/RepositoryModel.java b/modules/server/src/main/java/io/jpom/model/data/RepositoryModel.java index def75c118..3fb27a2b4 100644 --- a/modules/server/src/main/java/io/jpom/model/data/RepositoryModel.java +++ b/modules/server/src/main/java/io/jpom/model/data/RepositoryModel.java @@ -147,8 +147,8 @@ public class RepositoryModel extends BaseDbModel { Git(0, "Git"), Svn(1, "Svn"), ; - private int code; - private String desc; + private final int code; + private final String desc; RepoType(int code, String desc) { this.code = code;