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); } }