From 4bc4ea76adfd33cda230c3af927ba7ac79981594 Mon Sep 17 00:00:00 2001 From: stylefeng Date: Mon, 26 Aug 2024 00:09:16 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=908.3.0=E3=80=91=E3=80=90scanner?= =?UTF-8?q?=E3=80=91=E6=8A=BD=E5=87=BA=E4=B8=80=E4=B8=AA=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../roses/kernel/scanner/api/constants/ScannerConstants.java | 5 +++++ .../kernel/scanner/api/factory/ArrayMetadataFactory.java | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel-d-scanner/scanner-api/src/main/java/cn/stylefeng/roses/kernel/scanner/api/constants/ScannerConstants.java b/kernel-d-scanner/scanner-api/src/main/java/cn/stylefeng/roses/kernel/scanner/api/constants/ScannerConstants.java index 246aba3f9..dd7a57f60 100644 --- a/kernel-d-scanner/scanner-api/src/main/java/cn/stylefeng/roses/kernel/scanner/api/constants/ScannerConstants.java +++ b/kernel-d-scanner/scanner-api/src/main/java/cn/stylefeng/roses/kernel/scanner/api/constants/ScannerConstants.java @@ -102,4 +102,9 @@ public interface ScannerConstants { */ String REPORT_RES_AND_GET_RESULT_URL = "/resourceService/reportResourcesAndGetResult"; + /** + * 数组类型固定的元素名称 + */ + String ARRAY_FILED_CODE = "arrayItems"; + } diff --git a/kernel-d-scanner/scanner-api/src/main/java/cn/stylefeng/roses/kernel/scanner/api/factory/ArrayMetadataFactory.java b/kernel-d-scanner/scanner-api/src/main/java/cn/stylefeng/roses/kernel/scanner/api/factory/ArrayMetadataFactory.java index 5e00d3678..c398723d0 100644 --- a/kernel-d-scanner/scanner-api/src/main/java/cn/stylefeng/roses/kernel/scanner/api/factory/ArrayMetadataFactory.java +++ b/kernel-d-scanner/scanner-api/src/main/java/cn/stylefeng/roses/kernel/scanner/api/factory/ArrayMetadataFactory.java @@ -1,5 +1,6 @@ package cn.stylefeng.roses.kernel.scanner.api.factory; +import cn.stylefeng.roses.kernel.scanner.api.constants.ScannerConstants; import cn.stylefeng.roses.kernel.scanner.api.pojo.resource.FieldMetadata; /** @@ -21,7 +22,7 @@ public class ArrayMetadataFactory { return; } fieldMetadata.setChineseName("数组元素类型"); - fieldMetadata.setFieldName("arrayItems"); + fieldMetadata.setFieldName(ScannerConstants.ARRAY_FILED_CODE); } }