From 17f9908cba1f41803a7669a83d7d4e5ebf73a788 Mon Sep 17 00:00:00 2001 From: JustryDeng <13548417409@com> Date: Fri, 25 Oct 2024 23:55:39 +0800 Subject: [PATCH 01/10] =?UTF-8?q?version=20=3D>=20=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E6=9B=B4=E6=96=B0=E8=87=B31.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2b2dab5..d3e2008 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ - 1.1.1 + 1.1.2 1.6.0 -- Gitee From cf531c6db365b1e7bc0fa3bcc0970691f0fd50f5 Mon Sep 17 00:00:00 2001 From: JustryDeng <13548417409@com> Date: Sun, 27 Oct 2024 20:51:27 +0800 Subject: [PATCH 02/10] =?UTF-8?q?config=20=3D>=20springdoc=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=A3=85=E9=85=8D=E7=B1=BB=E6=98=AF=E5=90=A6=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E5=88=A4=E6=96=AD=E6=9D=A1=E4=BB=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../artifact/apidoc/knife4j/ZooKnife4jAutoConfiguration.java | 2 +- .../magicapi/config/ZooMagicSpringDocConfiguration.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/zoo-diy-artifact/zoo-diy-artifact-apidoc-knife4j/src/main/java/com/ideaaedi/zoo/diy/artifact/apidoc/knife4j/ZooKnife4jAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-apidoc-knife4j/src/main/java/com/ideaaedi/zoo/diy/artifact/apidoc/knife4j/ZooKnife4jAutoConfiguration.java index 10cb3b8..0859fe2 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-apidoc-knife4j/src/main/java/com/ideaaedi/zoo/diy/artifact/apidoc/knife4j/ZooKnife4jAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-apidoc-knife4j/src/main/java/com/ideaaedi/zoo/diy/artifact/apidoc/knife4j/ZooKnife4jAutoConfiguration.java @@ -56,7 +56,7 @@ import static org.springdoc.core.utils.Constants.SPRINGDOC_ENABLED; */ @ConditionalOnWebApplication @AutoConfigureBefore({SpringDocConfiguration.class, Knife4jAutoConfiguration.class}) -@ConditionalOnProperty(name = SPRINGDOC_ENABLED, matchIfMissing = true) +@ConditionalOnProperty(name = SPRINGDOC_ENABLED, havingValue = "true", matchIfMissing = true) @EnableConfigurationProperties({ZooKnife4jDIYGuideProperties.class, ZooKnife4jProperties.class}) @AutoConfigureOrder(AutoConfigurationConstant.ZOO_KNIFE4J_AUTO_CONFIGURATION_ORDER) public class ZooKnife4jAutoConfiguration { diff --git a/zoo-diy-artifact/zoo-diy-artifact-magic-api/src/main/java/com/ideaaedi/zoo/diy/artifact/magicapi/config/ZooMagicSpringDocConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-magic-api/src/main/java/com/ideaaedi/zoo/diy/artifact/magicapi/config/ZooMagicSpringDocConfiguration.java index cf43af2..0d9e01c 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-magic-api/src/main/java/com/ideaaedi/zoo/diy/artifact/magicapi/config/ZooMagicSpringDocConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-magic-api/src/main/java/com/ideaaedi/zoo/diy/artifact/magicapi/config/ZooMagicSpringDocConfiguration.java @@ -4,6 +4,7 @@ import jakarta.servlet.ServletContext; import lombok.extern.slf4j.Slf4j; import org.springdoc.core.properties.SwaggerUiConfigParameters; import org.springdoc.core.properties.SwaggerUiConfigProperties; +import org.springdoc.core.utils.Constants; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; @@ -44,7 +45,7 @@ import java.util.stream.Collectors; @Slf4j @Configuration @EnableConfigurationProperties(SpringDocConfig.class) -@ConditionalOnProperty(name = "springdoc.api-docs.enabled", matchIfMissing = true) +@ConditionalOnProperty(name = Constants.SPRINGDOC_ENABLED, havingValue = "true", matchIfMissing = true) public class ZooMagicSpringDocConfiguration implements MagicPluginConfiguration { private final MagicAPIProperties properties; -- Gitee From f04e645efa8340c42c0dd4f6510625eda62b9ff8 Mon Sep 17 00:00:00 2001 From: JustryDeng <13548417409@com> Date: Sun, 27 Oct 2024 21:35:12 +0800 Subject: [PATCH 03/10] =?UTF-8?q?config=20=3D>=20zoo=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=BB=84=E4=BB=B6=E8=87=AA=E5=8A=A8=E8=A3=85?= =?UTF-8?q?=E9=85=8D=E7=B1=BB=E5=A2=9E=E5=8A=A0=E4=B8=80=E9=94=AE=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E7=A6=81=E7=94=A8=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../knife4j/ZooKnife4jAutoConfiguration.java | 6 ++++- .../satoken/ZooSaTokenAutoConfiguration.java | 2 ++ ...ZooDynamicDatasourceAutoConfiguration.java | 2 ++ .../ZooGeneratorAutoConfiguration.java | 2 ++ .../ZooGrayscaleAspectAutoConfiguration.java | 2 ++ .../ZooLiteflowAutoConfiguration.java | 2 ++ ...ooLoggingMicrometerAutoConfiguration.java} | 4 ++- ...ot.autoconfigure.AutoConfiguration.imports | 2 +- .../ZooMagicApiAutoConfiguration.java | 2 ++ .../ZooMybatisPlusAutoConfiguration.java | 2 ++ .../ZooOpenfeignAutoConfiguration.java | 4 ++- .../seata/ZooSeataAutoConfiguration.java | 2 ++ .../ZooShardingsphereAutoConfiguration.java | 2 ++ .../artifact/sse/ZooSseAutoConfiguration.java | 2 ++ .../ZooTenantLikeAutoConfiguration.java | 2 ++ .../ZooWebsocketAutoConfiguration.java | 2 ++ .../api/ZooAuditLogApiAutoConfiguration.java | 2 ++ .../bpmn/api/ZooBpmnApiAutoConfiguration.java | 2 ++ .../api}/ZooConfigApiAutoConfiguration.java | 11 +++++--- .../logger/LogbackLoggerLevelChanger.java | 4 +-- .../api}/logger/pakage-info.java | 2 +- .../config => config/api}/pakage-info.java | 2 +- .../processor/ZooConfigApiEnvProcessor.java | 25 +++++++++++++++++++ .../AppStartedLoggerLevelProperties.java | 2 +- .../ZooConfigApiDIYGuideProperties.java | 16 ++++++++++++ .../main/resources/META-INF/spring.factories | 2 ++ ...ot.autoconfigure.AutoConfiguration.imports | 2 +- .../zoo-diy-feature-config-api.default.yaml | 11 ++++++++ ...oExpressionEngineApiAutoConfiguration.java | 1 + ... => ZooFieldPermApiAutoConfiguration.java} | 4 ++- ...ot.autoconfigure.AutoConfiguration.imports | 2 +- .../ZooLiteFeatureApiAutoConfiguration.java | 2 ++ .../msg/api/ZooMsgApiAutoConfiguration.java | 2 ++ ...ZooAuditLogByOpenapiAutoConfiguration.java | 2 ++ .../ZooBpmnByFlowableAutoConfiguration.java | 2 ++ .../ZooConfigNacosAutoConfiguration.java | 2 ++ .../zoo-diy-feature-config-nacos.default.yaml | 2 +- .../ZooQLExpressAutoConfiguration.java | 2 ++ .../ZooFpByOpenapiAutoConfiguration.java | 2 ++ .../ZooXFileStorageAutoConfiguration.java | 2 ++ .../ZooI18nSpringAutoConfiguration.java | 2 ++ .../cs/ZooLiteFeatureCsAutoConfiguration.java | 2 ++ .../ZooEmailJakartaAutoConfiguration.java | 2 ++ .../ZooMqRocketmqAutoConfiguration.java | 2 ++ .../sms4j/ZooSmsSms4jAutoConfiguration.java | 1 + .../ZooReByBodyAdviceAutoConfiguration.java | 1 + 46 files changed, 139 insertions(+), 17 deletions(-) rename zoo-diy-artifact/zoo-diy-artifact-logging-micrometer/src/main/java/com/ideaaedi/zoo/diy/artifact/logging/micrometer/{ZooLoggingSleuthAutoConfiguration.java => ZooLoggingMicrometerAutoConfiguration.java} (94%) rename zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/{i18n/config => config/api}/ZooConfigApiAutoConfiguration.java (51%) rename zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/{i18n/config => config/api}/logger/LogbackLoggerLevelChanger.java (96%) rename zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/{i18n/config => config/api}/logger/pakage-info.java (47%) rename zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/{i18n/config => config/api}/pakage-info.java (37%) create mode 100644 zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/processor/ZooConfigApiEnvProcessor.java rename zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/{i18n/config => config/api}/properties/AppStartedLoggerLevelProperties.java (71%) create mode 100644 zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/properties/ZooConfigApiDIYGuideProperties.java create mode 100644 zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/resources/META-INF/spring.factories create mode 100644 zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/resources/zoo-diy-feature-config-api.default.yaml rename zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/api/{ZooFieldPermAutoConfiguration.java => ZooFieldPermApiAutoConfiguration.java} (84%) diff --git a/zoo-diy-artifact/zoo-diy-artifact-apidoc-knife4j/src/main/java/com/ideaaedi/zoo/diy/artifact/apidoc/knife4j/ZooKnife4jAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-apidoc-knife4j/src/main/java/com/ideaaedi/zoo/diy/artifact/apidoc/knife4j/ZooKnife4jAutoConfiguration.java index 0859fe2..a41d063 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-apidoc-knife4j/src/main/java/com/ideaaedi/zoo/diy/artifact/apidoc/knife4j/ZooKnife4jAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-apidoc-knife4j/src/main/java/com/ideaaedi/zoo/diy/artifact/apidoc/knife4j/ZooKnife4jAutoConfiguration.java @@ -56,7 +56,7 @@ import static org.springdoc.core.utils.Constants.SPRINGDOC_ENABLED; */ @ConditionalOnWebApplication @AutoConfigureBefore({SpringDocConfiguration.class, Knife4jAutoConfiguration.class}) -@ConditionalOnProperty(name = SPRINGDOC_ENABLED, havingValue = "true", matchIfMissing = true) +@ConditionalOnProperty(value = "zoo.switch.artifact-apidoc-knife4j.enable", havingValue = "true", matchIfMissing = true) @EnableConfigurationProperties({ZooKnife4jDIYGuideProperties.class, ZooKnife4jProperties.class}) @AutoConfigureOrder(AutoConfigurationConstant.ZOO_KNIFE4J_AUTO_CONFIGURATION_ORDER) public class ZooKnife4jAutoConfiguration { @@ -80,12 +80,14 @@ public class ZooKnife4jAutoConfiguration { @Bean @ConditionalOnMissingBean + @ConditionalOnProperty(name = SPRINGDOC_ENABLED, havingValue = "true", matchIfMissing = true) public EnumDescCustomizer enumPropertyCustomizer() { return new EnumDescCustomizer(); } @Bean @ConditionalOnMissingBean + @ConditionalOnProperty(name = SPRINGDOC_ENABLED, havingValue = "true", matchIfMissing = true) public FieldTypeFormatCustomizer fieldTypeFormatCustomizer() { return new FieldTypeFormatCustomizer(); } @@ -97,6 +99,7 @@ public class ZooKnife4jAutoConfiguration { */ @Bean @ConditionalOnMissingBean + @ConditionalOnProperty(name = SPRINGDOC_ENABLED, havingValue = "true", matchIfMissing = true) public ZooKnife4jOpenApiCustomizer zooKnife4jOpenApiCustomizer( @Autowired ZooKnife4jProperties zooKnife4jProperties, @Autowired(required = false) AuthUrlWhitelist authUrlWhitelist, @@ -109,6 +112,7 @@ public class ZooKnife4jAutoConfiguration { @Bean @Lazy(false) @ConditionalOnMissingBean + @ConditionalOnProperty(name = SPRINGDOC_ENABLED, havingValue = "true", matchIfMissing = true) public OpenAPIService openAPIBuilder(Optional openAPI, SecurityService securityParser, SpringDocConfigProperties springDocConfigProperties, diff --git a/zoo-diy-artifact/zoo-diy-artifact-auth-sa-token/src/main/java/com/ideaaedi/zoo/diy/artifact/auth/satoken/ZooSaTokenAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-auth-sa-token/src/main/java/com/ideaaedi/zoo/diy/artifact/auth/satoken/ZooSaTokenAutoConfiguration.java index bb4ef45..4ff6017 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-auth-sa-token/src/main/java/com/ideaaedi/zoo/diy/artifact/auth/satoken/ZooSaTokenAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-auth-sa-token/src/main/java/com/ideaaedi/zoo/diy/artifact/auth/satoken/ZooSaTokenAutoConfiguration.java @@ -18,6 +18,7 @@ import com.ideaaedi.zoo.diy.artifact.auth.satoken.properties.ZooSaTokenDIYGuideP import com.ideaaedi.zoo.diy.artifact.auth.satoken.properties.nested.ZooAuthBasic; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.ConfigurationPropertiesBinding; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.web.servlet.FilterRegistrationBean; @@ -32,6 +33,7 @@ import java.util.Optional; */ @Slf4j @EnableConfigurationProperties({ZooSaTokenDIYGuideProperties.class, ZooAuthProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.artifact-auth-sa-token.enable", havingValue = "true", matchIfMissing = true) public class ZooSaTokenAutoConfiguration { @Bean diff --git a/zoo-diy-artifact/zoo-diy-artifact-dynamic-datasource/src/main/java/com/ideaaedi/zoo/diy/artifact/dynamic/datasource/ZooDynamicDatasourceAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-dynamic-datasource/src/main/java/com/ideaaedi/zoo/diy/artifact/dynamic/datasource/ZooDynamicDatasourceAutoConfiguration.java index 2fa8bb0..063ad52 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-dynamic-datasource/src/main/java/com/ideaaedi/zoo/diy/artifact/dynamic/datasource/ZooDynamicDatasourceAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-dynamic-datasource/src/main/java/com/ideaaedi/zoo/diy/artifact/dynamic/datasource/ZooDynamicDatasourceAutoConfiguration.java @@ -1,6 +1,7 @@ package com.ideaaedi.zoo.diy.artifact.dynamic.datasource; import com.ideaaedi.zoo.diy.artifact.dynamic.datasource.properties.ZooDynamicDatasourceDIYGuideProperties; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; /** @@ -8,5 +9,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties */ @EnableConfigurationProperties({ZooDynamicDatasourceDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.artifact-dynamic-datasource.enable", havingValue = "true", matchIfMissing = true) public class ZooDynamicDatasourceAutoConfiguration { } \ No newline at end of file diff --git a/zoo-diy-artifact/zoo-diy-artifact-generator/src/main/java/com/ideaaedi/zoo/diy/artifact/generator/ZooGeneratorAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-generator/src/main/java/com/ideaaedi/zoo/diy/artifact/generator/ZooGeneratorAutoConfiguration.java index 508f708..833511b 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-generator/src/main/java/com/ideaaedi/zoo/diy/artifact/generator/ZooGeneratorAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-generator/src/main/java/com/ideaaedi/zoo/diy/artifact/generator/ZooGeneratorAutoConfiguration.java @@ -7,6 +7,7 @@ import com.ideaaedi.zoo.diy.artifact.generator.properties.ZooGeneratorDIYGuidePr import com.ideaaedi.zoo.diy.artifact.generator.properties.ZooGeneratorProperties; import org.springframework.boot.autoconfigure.AutoConfigureOrder; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -17,6 +18,7 @@ import org.springframework.context.annotation.Bean; }) @AutoConfigureOrder(AutoConfigurationConstant.ZOO_GENERATOR_AUTO_CONFIGURATION_ORDER) @EnableConfigurationProperties({ZooGeneratorProperties.class, ZooGeneratorDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.artifact-generator.enable", havingValue = "true", matchIfMissing = true) public class ZooGeneratorAutoConfiguration { @Bean diff --git a/zoo-diy-artifact/zoo-diy-artifact-grayscale-aspect/src/main/java/com/ideaaedi/zoo/diy/artifact/grayscale/aspect/ZooGrayscaleAspectAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-grayscale-aspect/src/main/java/com/ideaaedi/zoo/diy/artifact/grayscale/aspect/ZooGrayscaleAspectAutoConfiguration.java index eeb68e5..35c2d4e 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-grayscale-aspect/src/main/java/com/ideaaedi/zoo/diy/artifact/grayscale/aspect/ZooGrayscaleAspectAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-grayscale-aspect/src/main/java/com/ideaaedi/zoo/diy/artifact/grayscale/aspect/ZooGrayscaleAspectAutoConfiguration.java @@ -5,6 +5,7 @@ import com.ideaaedi.zoo.diy.artifact.grayscale.aspect.advice.GrayscaleFastFailCh import com.ideaaedi.zoo.diy.artifact.grayscale.aspect.properties.ZooGrayscaleAspectDIYGuideProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -12,6 +13,7 @@ import org.springframework.context.annotation.Bean; * aspect灰度 自动配置 */ @EnableConfigurationProperties({ZooGrayscaleAspectDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.artifact-grayscale-aspect.enable", havingValue = "true", matchIfMissing = true) public class ZooGrayscaleAspectAutoConfiguration { @Bean diff --git a/zoo-diy-artifact/zoo-diy-artifact-liteflow/src/main/java/com/ideaaedi/zoo/diy/artifact/liteflow/ZooLiteflowAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-liteflow/src/main/java/com/ideaaedi/zoo/diy/artifact/liteflow/ZooLiteflowAutoConfiguration.java index 4a9b7c6..665edad 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-liteflow/src/main/java/com/ideaaedi/zoo/diy/artifact/liteflow/ZooLiteflowAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-liteflow/src/main/java/com/ideaaedi/zoo/diy/artifact/liteflow/ZooLiteflowAutoConfiguration.java @@ -2,6 +2,7 @@ package com.ideaaedi.zoo.diy.artifact.liteflow; import com.ideaaedi.zoo.diy.artifact.liteflow.properties.ZoolLiteflowDIYGuideProperties; import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; /** @@ -9,6 +10,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties */ @Slf4j @EnableConfigurationProperties(ZoolLiteflowDIYGuideProperties.class) +@ConditionalOnProperty(value = "zoo.switch.artifact-liteflow.enable", havingValue = "true", matchIfMissing = true) public class ZooLiteflowAutoConfiguration { } \ No newline at end of file diff --git a/zoo-diy-artifact/zoo-diy-artifact-logging-micrometer/src/main/java/com/ideaaedi/zoo/diy/artifact/logging/micrometer/ZooLoggingSleuthAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-logging-micrometer/src/main/java/com/ideaaedi/zoo/diy/artifact/logging/micrometer/ZooLoggingMicrometerAutoConfiguration.java similarity index 94% rename from zoo-diy-artifact/zoo-diy-artifact-logging-micrometer/src/main/java/com/ideaaedi/zoo/diy/artifact/logging/micrometer/ZooLoggingSleuthAutoConfiguration.java rename to zoo-diy-artifact/zoo-diy-artifact-logging-micrometer/src/main/java/com/ideaaedi/zoo/diy/artifact/logging/micrometer/ZooLoggingMicrometerAutoConfiguration.java index 2d92158..429bfb5 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-logging-micrometer/src/main/java/com/ideaaedi/zoo/diy/artifact/logging/micrometer/ZooLoggingSleuthAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-logging-micrometer/src/main/java/com/ideaaedi/zoo/diy/artifact/logging/micrometer/ZooLoggingMicrometerAutoConfiguration.java @@ -21,6 +21,7 @@ import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryAutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfigureBefore; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; @@ -33,7 +34,8 @@ import org.springframework.core.env.Environment; @Import(TraceXdFilter.class) @AutoConfigureBefore(OpenTelemetryAutoConfiguration.class) @EnableConfigurationProperties({ZooLoggingMicrometerDIYGuideProperties.class}) -public class ZooLoggingSleuthAutoConfiguration { +@ConditionalOnProperty(value = "zoo.switch.artifact-logging-micrometer.enable", havingValue = "true", matchIfMissing = true) +public class ZooLoggingMicrometerAutoConfiguration { @Bean public ObservedAspect observedAspect(ObservationRegistry observationRegistry) { diff --git a/zoo-diy-artifact/zoo-diy-artifact-logging-micrometer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/zoo-diy-artifact/zoo-diy-artifact-logging-micrometer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2cb23e9..7bd71c7 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-logging-micrometer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/zoo-diy-artifact/zoo-diy-artifact-logging-micrometer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,3 +1,3 @@ # This file is used to import additional auto-configuration classes in Spring Boot 3. # 每个实现类的全类名单独一行 -com.ideaaedi.zoo.diy.artifact.logging.micrometer.ZooLoggingSleuthAutoConfiguration \ No newline at end of file +com.ideaaedi.zoo.diy.artifact.logging.micrometer.ZooLoggingMicrometerAutoConfiguration \ No newline at end of file diff --git a/zoo-diy-artifact/zoo-diy-artifact-magic-api/src/main/java/com/ideaaedi/zoo/diy/artifact/magicapi/ZooMagicApiAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-magic-api/src/main/java/com/ideaaedi/zoo/diy/artifact/magicapi/ZooMagicApiAutoConfiguration.java index a484fc8..0fa4dcf 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-magic-api/src/main/java/com/ideaaedi/zoo/diy/artifact/magicapi/ZooMagicApiAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-magic-api/src/main/java/com/ideaaedi/zoo/diy/artifact/magicapi/ZooMagicApiAutoConfiguration.java @@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfigureBefore; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.bind.Bindable; @@ -41,6 +42,7 @@ import java.time.format.DateTimeFormatter; @AutoConfigureBefore(MagicAPIAutoConfiguration.class) @ImportAutoConfiguration(ZooMagicSpringDocConfiguration.class) @EnableConfigurationProperties({ZooMagicApiDIYGuideProperties.class, ZooMagicApiProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.artifact-magic-api.enable", havingValue = "true", matchIfMissing = true) public class ZooMagicApiAutoConfiguration { @Value("${spring.jackson.date-format:yyyy-MM-dd HH:mm:ss}") diff --git a/zoo-diy-artifact/zoo-diy-artifact-mybatis-plus/src/main/java/com/ideaaedi/zoo/diy/artifact/mybatisplus/ZooMybatisPlusAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-mybatis-plus/src/main/java/com/ideaaedi/zoo/diy/artifact/mybatisplus/ZooMybatisPlusAutoConfiguration.java index e1bf8e4..cf6eec7 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-mybatis-plus/src/main/java/com/ideaaedi/zoo/diy/artifact/mybatisplus/ZooMybatisPlusAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-mybatis-plus/src/main/java/com/ideaaedi/zoo/diy/artifact/mybatisplus/ZooMybatisPlusAutoConfiguration.java @@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.AutoConfigureOrder; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; @@ -30,6 +31,7 @@ import java.util.stream.Collectors; @Import(MybatisPlusSqlInjector.class) @EnableConfigurationProperties(ZooMybatisPlusDIYGuideProperties.class) @AutoConfigureOrder(AutoConfigurationConstant.ZOO_MYBATIS_PLUS_AUTO_CONFIGURATION_ORDER) +@ConditionalOnProperty(value = "zoo.switch.artifact-mybatis-plus.enable", havingValue = "true", matchIfMissing = true) public class ZooMybatisPlusAutoConfiguration { @Bean(name = AutoConfigurationConstant.MYBATIS_PLUS_INTERCEPTOR_BEAN_NAME) diff --git a/zoo-diy-artifact/zoo-diy-artifact-openfeign/src/main/java/com/ideaaedi/zoo/diy/artifact/openfeign/ZooOpenfeignAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-openfeign/src/main/java/com/ideaaedi/zoo/diy/artifact/openfeign/ZooOpenfeignAutoConfiguration.java index 1084cef..39a9c5c 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-openfeign/src/main/java/com/ideaaedi/zoo/diy/artifact/openfeign/ZooOpenfeignAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-openfeign/src/main/java/com/ideaaedi/zoo/diy/artifact/openfeign/ZooOpenfeignAutoConfiguration.java @@ -7,6 +7,7 @@ import com.ideaaedi.zoo.diy.artifact.openfeign.properties.ZooOpenfeignProperties import lombok.extern.slf4j.Slf4j; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.core.env.Environment; @@ -15,8 +16,9 @@ import org.springframework.core.env.Environment; * open feign 自动配置 */ @Slf4j -@EnableConfigurationProperties({ZooOpenfeignDIYGuideProperties.class, ZooOpenfeignProperties.class}) @ImportAutoConfiguration(classes = OpenfeignCompatibleConfig.class) +@EnableConfigurationProperties({ZooOpenfeignDIYGuideProperties.class, ZooOpenfeignProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.artifact-openfeign.enable", havingValue = "true", matchIfMissing = true) public class ZooOpenfeignAutoConfiguration { @Bean diff --git a/zoo-diy-artifact/zoo-diy-artifact-seata/src/main/java/com/ideaaedi/zoo/diy/artifact/seata/ZooSeataAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-seata/src/main/java/com/ideaaedi/zoo/diy/artifact/seata/ZooSeataAutoConfiguration.java index 5b34197..4078267 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-seata/src/main/java/com/ideaaedi/zoo/diy/artifact/seata/ZooSeataAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-seata/src/main/java/com/ideaaedi/zoo/diy/artifact/seata/ZooSeataAutoConfiguration.java @@ -1,12 +1,14 @@ package com.ideaaedi.zoo.diy.artifact.seata; import com.ideaaedi.zoo.diy.artifact.seata.properties.ZooSeataDIYGuideProperties; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; /** * seata 自动配置 */ @EnableConfigurationProperties({ZooSeataDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.artifact-seata.enable", havingValue = "true", matchIfMissing = true) public class ZooSeataAutoConfiguration { } \ No newline at end of file diff --git a/zoo-diy-artifact/zoo-diy-artifact-shardingsphere/src/main/java/com/ideaaedi/zoo/diy/artifact/shardingsphere/ZooShardingsphereAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-shardingsphere/src/main/java/com/ideaaedi/zoo/diy/artifact/shardingsphere/ZooShardingsphereAutoConfiguration.java index be1c319..2042a4a 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-shardingsphere/src/main/java/com/ideaaedi/zoo/diy/artifact/shardingsphere/ZooShardingsphereAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-shardingsphere/src/main/java/com/ideaaedi/zoo/diy/artifact/shardingsphere/ZooShardingsphereAutoConfiguration.java @@ -1,12 +1,14 @@ package com.ideaaedi.zoo.diy.artifact.shardingsphere; import com.ideaaedi.zoo.diy.artifact.shardingsphere.properties.ZooShardingsphereDIYGuideProperties; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; /** * shardingsphere 自动配置 */ @EnableConfigurationProperties({ZooShardingsphereDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.artifact-shardingsphere.enable", havingValue = "true", matchIfMissing = true) public class ZooShardingsphereAutoConfiguration { } \ No newline at end of file diff --git a/zoo-diy-artifact/zoo-diy-artifact-sse/src/main/java/com/ideaaedi/zoo/diy/artifact/sse/ZooSseAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-sse/src/main/java/com/ideaaedi/zoo/diy/artifact/sse/ZooSseAutoConfiguration.java index 959a4ae..c18d6cf 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-sse/src/main/java/com/ideaaedi/zoo/diy/artifact/sse/ZooSseAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-sse/src/main/java/com/ideaaedi/zoo/diy/artifact/sse/ZooSseAutoConfiguration.java @@ -8,6 +8,7 @@ import com.ideaaedi.zoo.diy.artifact.sse.properties.ZooSseProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -16,6 +17,7 @@ import org.springframework.context.annotation.Bean; */ @ImportAutoConfiguration(DistributeSseMsgConfig.class) @EnableConfigurationProperties({ZooSseProperties.class, ZooSseDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.artifact-sse.enable", havingValue = "true", matchIfMissing = true) public class ZooSseAutoConfiguration { @Bean diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/ZooTenantLikeAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/ZooTenantLikeAutoConfiguration.java index be729eb..128628b 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/ZooTenantLikeAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/ZooTenantLikeAutoConfiguration.java @@ -26,6 +26,7 @@ import net.sf.jsqlparser.expression.StringValue; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.AutoConfigureOrder; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.ApplicationContext; @@ -45,6 +46,7 @@ import java.util.stream.Collectors; @Import(TenantScopeAspect.class) @AutoConfigureOrder(AutoConfigurationConstant.ZOO_TENANT_LIKE_AUTO_CONFIGURATION_ORDER) @EnableConfigurationProperties({ZooTenantLikeDIYGuideProperties.class, ZooTenantLikeProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.artifact-tenant-like.enable", havingValue = "true", matchIfMissing = true) public class ZooTenantLikeAutoConfiguration { @Bean diff --git a/zoo-diy-artifact/zoo-diy-artifact-websocket/src/main/java/com/ideaaedi/zoo/diy/artifact/websocket/ZooWebsocketAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-websocket/src/main/java/com/ideaaedi/zoo/diy/artifact/websocket/ZooWebsocketAutoConfiguration.java index 6bf26ce..7cec9a0 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-websocket/src/main/java/com/ideaaedi/zoo/diy/artifact/websocket/ZooWebsocketAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-websocket/src/main/java/com/ideaaedi/zoo/diy/artifact/websocket/ZooWebsocketAutoConfiguration.java @@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.config.AutowireCapableBeanFactory; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; @@ -22,6 +23,7 @@ import org.springframework.web.socket.server.standard.ServletServerContainerFact @Slf4j @ImportAutoConfiguration(DistributeWebsocketMsgConfig.class) @EnableConfigurationProperties({ZooWebsocketProperties.class, ZooWebsocketDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.artifact-websocket.enable", havingValue = "true", matchIfMissing = true) public class ZooWebsocketAutoConfiguration { /** diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-audit-log-api/src/main/java/com/ideaaedi/zoo/diy/feature/auditlog/api/ZooAuditLogApiAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-audit-log-api/src/main/java/com/ideaaedi/zoo/diy/feature/auditlog/api/ZooAuditLogApiAutoConfiguration.java index bd8906c..b5fe385 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-audit-log-api/src/main/java/com/ideaaedi/zoo/diy/feature/auditlog/api/ZooAuditLogApiAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-audit-log-api/src/main/java/com/ideaaedi/zoo/diy/feature/auditlog/api/ZooAuditLogApiAutoConfiguration.java @@ -6,6 +6,7 @@ import com.ideaaedi.zoo.diy.feature.auditlog.api.properties.ZooAuditLogApiProper import com.ideaaedi.zoo.diy.feature.auditlog.api.spi.AuditLogCollector; import com.ideaaedi.zoo.diy.feature.auditlog.api.spi.AuditLogRecorder; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.ConfigurationPropertiesBinding; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -14,6 +15,7 @@ import org.springframework.context.annotation.Bean; * 审计日志抽象逻辑 自动配置 */ @EnableConfigurationProperties(ZooAuditLogApiProperties.class) +@ConditionalOnProperty(value = "zoo.switch.feature-audit-log-api.enable", havingValue = "true", matchIfMissing = true) public class ZooAuditLogApiAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-bpmn-api/src/main/java/com/ideaaedi/zoo/diy/feature/bpmn/api/ZooBpmnApiAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-bpmn-api/src/main/java/com/ideaaedi/zoo/diy/feature/bpmn/api/ZooBpmnApiAutoConfiguration.java index b89f98e..435d0f8 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-bpmn-api/src/main/java/com/ideaaedi/zoo/diy/feature/bpmn/api/ZooBpmnApiAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-bpmn-api/src/main/java/com/ideaaedi/zoo/diy/feature/bpmn/api/ZooBpmnApiAutoConfiguration.java @@ -2,6 +2,7 @@ package com.ideaaedi.zoo.diy.feature.bpmn.api; import com.ideaaedi.zoo.diy.feature.bpmn.api.properties.ZooBpmnApiDIYGuideProperties; import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; /** @@ -9,6 +10,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties */ @Slf4j @EnableConfigurationProperties(ZooBpmnApiDIYGuideProperties.class) +@ConditionalOnProperty(value = "zoo.switch.feature-bpmn-api.enable", havingValue = "true", matchIfMissing = true) public class ZooBpmnApiAutoConfiguration { } diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/ZooConfigApiAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/ZooConfigApiAutoConfiguration.java similarity index 51% rename from zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/ZooConfigApiAutoConfiguration.java rename to zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/ZooConfigApiAutoConfiguration.java index 90517e5..8162e16 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/ZooConfigApiAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/ZooConfigApiAutoConfiguration.java @@ -1,8 +1,10 @@ -package com.ideaaedi.zoo.diy.feature.i18n.config; +package com.ideaaedi.zoo.diy.feature.config.api; -import com.ideaaedi.zoo.diy.feature.i18n.config.logger.LogbackLoggerLevelChanger; -import com.ideaaedi.zoo.diy.feature.i18n.config.properties.AppStartedLoggerLevelProperties; +import com.ideaaedi.zoo.diy.feature.config.api.logger.LogbackLoggerLevelChanger; +import com.ideaaedi.zoo.diy.feature.config.api.properties.AppStartedLoggerLevelProperties; +import com.ideaaedi.zoo.diy.feature.config.api.properties.ZooConfigApiDIYGuideProperties; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.scheduling.annotation.EnableAsync; @@ -11,7 +13,8 @@ import org.springframework.scheduling.annotation.EnableAsync; * config 自动配置 */ @EnableAsync -@EnableConfigurationProperties(AppStartedLoggerLevelProperties.class) +@EnableConfigurationProperties({AppStartedLoggerLevelProperties.class, ZooConfigApiDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-config-api.enable", havingValue = "true", matchIfMissing = true) public class ZooConfigApiAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/logger/LogbackLoggerLevelChanger.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/logger/LogbackLoggerLevelChanger.java similarity index 96% rename from zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/logger/LogbackLoggerLevelChanger.java rename to zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/logger/LogbackLoggerLevelChanger.java index 2fecaee..3f19c0f 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/logger/LogbackLoggerLevelChanger.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/logger/LogbackLoggerLevelChanger.java @@ -1,9 +1,9 @@ -package com.ideaaedi.zoo.diy.feature.i18n.config.logger; +package com.ideaaedi.zoo.diy.feature.config.api.logger; import ch.qos.logback.classic.Level; import com.ideaaedi.zoo.commonbase.entity.log.LoggerLevelDTO; import com.ideaaedi.zoo.commonbase.event.LoggerLevelChangeEvent; -import com.ideaaedi.zoo.diy.feature.i18n.config.properties.AppStartedLoggerLevelProperties; +import com.ideaaedi.zoo.diy.feature.config.api.properties.AppStartedLoggerLevelProperties; import lombok.extern.slf4j.Slf4j; import org.slf4j.ILoggerFactory; import org.slf4j.Logger; diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/logger/pakage-info.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/logger/pakage-info.java similarity index 47% rename from zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/logger/pakage-info.java rename to zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/logger/pakage-info.java index 4c9149c..c8268cb 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/logger/pakage-info.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/logger/pakage-info.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.diy.feature.i18n.config.logger; +package com.ideaaedi.zoo.diy.feature.config.api.logger; /* * 支持通过配置中心动态修改日志级别 */ \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/pakage-info.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/pakage-info.java similarity index 37% rename from zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/pakage-info.java rename to zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/pakage-info.java index 3f2b97d..ccb9d2f 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/pakage-info.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/pakage-info.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.diy.feature.i18n.config; +package com.ideaaedi.zoo.diy.feature.config.api; /* * 配置中心 能力支持 */ \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/processor/ZooConfigApiEnvProcessor.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/processor/ZooConfigApiEnvProcessor.java new file mode 100644 index 0000000..30f6192 --- /dev/null +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/processor/ZooConfigApiEnvProcessor.java @@ -0,0 +1,25 @@ +package com.ideaaedi.zoo.diy.feature.config.api.processor; + + +import com.ideaaedi.zoo.commonbase.processor.ZooEnvironmentPostProcessor; + +/* + * 默认配置文件加载 + */ +public class ZooConfigApiEnvProcessor extends ZooEnvironmentPostProcessor { + + @Override + protected String propertySourceName() { + return "zoo-diy-feature-config-api.default"; + } + + @Override + protected String propertySourceClasspath() { + return "zoo-diy-feature-config-api.default.yaml"; + } + + @Override + protected boolean highestPriority() { + return false; + } +} diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/properties/AppStartedLoggerLevelProperties.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/properties/AppStartedLoggerLevelProperties.java similarity index 71% rename from zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/properties/AppStartedLoggerLevelProperties.java rename to zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/properties/AppStartedLoggerLevelProperties.java index 8d49c29..a81aceb 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/config/properties/AppStartedLoggerLevelProperties.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/properties/AppStartedLoggerLevelProperties.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.diy.feature.i18n.config.properties; +package com.ideaaedi.zoo.diy.feature.config.api.properties; import com.ideaaedi.zoo.commonbase.properties.LoggerLevelProperties; diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/properties/ZooConfigApiDIYGuideProperties.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/properties/ZooConfigApiDIYGuideProperties.java new file mode 100644 index 0000000..d948092 --- /dev/null +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/java/com/ideaaedi/zoo/diy/feature/config/api/properties/ZooConfigApiDIYGuideProperties.java @@ -0,0 +1,16 @@ +package com.ideaaedi.zoo.diy.feature.config.api.properties; + +import com.ideaaedi.zoo.commonbase.info.DefaultDIYGuide; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * (non-javadoc) + * + * @author JustryDeng + * @since 1.0.0 + */ +@ConfigurationProperties(prefix = "zoo.guide.diy.zoo-config-api") +public class ZooConfigApiDIYGuideProperties extends DefaultDIYGuide { + +} diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/resources/META-INF/spring.factories b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..decbd09 --- /dev/null +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.env.EnvironmentPostProcessor=\ + com.ideaaedi.zoo.diy.feature.config.api.processor.ZooConfigApiEnvProcessor \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 557ec87..e505bf5 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,3 +1,3 @@ # This file is used to import additional auto-configuration classes in Spring Boot 3. # 每个实现类的全类名单独一行 -com.ideaaedi.zoo.diy.feature.i18n.config.ZooConfigApiAutoConfiguration \ No newline at end of file +com.ideaaedi.zoo.diy.feature.config.api.ZooConfigApiAutoConfiguration \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/resources/zoo-diy-feature-config-api.default.yaml b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/resources/zoo-diy-feature-config-api.default.yaml new file mode 100644 index 0000000..e635d35 --- /dev/null +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-config-api/src/main/resources/zoo-diy-feature-config-api.default.yaml @@ -0,0 +1,11 @@ +zoo: + guide: + diy: + zoo-config-api: + order: 1080 + name: "zoo-diy-feature-config-api" + instruction: |- + 1.此组件提供配置管理通用能力支持 + contacts: + - name: "作者邮箱" + value: "13548417409@163.com" \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-expression-engine-api/src/main/java/com/ideaaedi/zoo/diy/feature/expression/engine/api/ZooExpressionEngineApiAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-expression-engine-api/src/main/java/com/ideaaedi/zoo/diy/feature/expression/engine/api/ZooExpressionEngineApiAutoConfiguration.java index 029ee51..9840cdf 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-expression-engine-api/src/main/java/com/ideaaedi/zoo/diy/feature/expression/engine/api/ZooExpressionEngineApiAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-expression-engine-api/src/main/java/com/ideaaedi/zoo/diy/feature/expression/engine/api/ZooExpressionEngineApiAutoConfiguration.java @@ -21,6 +21,7 @@ import org.springframework.core.ParameterNameDiscoverer; */ @Slf4j @EnableConfigurationProperties({ZooExpressionEngineDIYGuideProperties.class, ZooExpressionEngineProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-expression-engine-api.enable", havingValue = "true", matchIfMissing = true) public class ZooExpressionEngineApiAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/api/ZooFieldPermAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/api/ZooFieldPermApiAutoConfiguration.java similarity index 84% rename from zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/api/ZooFieldPermAutoConfiguration.java rename to zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/api/ZooFieldPermApiAutoConfiguration.java index 42b6d12..c71633a 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/api/ZooFieldPermAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/api/ZooFieldPermApiAutoConfiguration.java @@ -7,13 +7,15 @@ import com.ideaaedi.zoo.diy.feature.fieldperm.api.spi.MethodArgFieldRepositorySe import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; /** * 接口字段权限 自动配置 */ @Slf4j -public class ZooFieldPermAutoConfiguration { +@ConditionalOnProperty(value = "zoo.switch.feature-field-perm-api.enable", havingValue = "true", matchIfMissing = true) +public class ZooFieldPermApiAutoConfiguration { @Bean @ConditionalOnMissingBean diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index d6d880f..bc1946e 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,3 +1,3 @@ # This file is used to import additional auto-configuration classes in Spring Boot 3. # 每个实现类的全类名单独一行 -com.ideaaedi.zoo.diy.feature.fieldperm.api.ZooFieldPermAutoConfiguration \ No newline at end of file +com.ideaaedi.zoo.diy.feature.fieldperm.api.ZooFieldPermApiAutoConfiguration \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-lite-feature-api/src/main/java/com/ideaaedi/zoo/diy/feature/litefeature/api/ZooLiteFeatureApiAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-lite-feature-api/src/main/java/com/ideaaedi/zoo/diy/feature/litefeature/api/ZooLiteFeatureApiAutoConfiguration.java index 522c768..79a2754 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-lite-feature-api/src/main/java/com/ideaaedi/zoo/diy/feature/litefeature/api/ZooLiteFeatureApiAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-lite-feature-api/src/main/java/com/ideaaedi/zoo/diy/feature/litefeature/api/ZooLiteFeatureApiAutoConfiguration.java @@ -7,6 +7,7 @@ import com.ideaaedi.zoo.diy.feature.litefeature.api.lock.LockSupplierManager; import com.ideaaedi.zoo.diy.feature.litefeature.api.properties.ZooLiteFeatureApiDIYGuideProperties; import com.ideaaedi.zoo.diy.feature.litefeature.api.properties.ZooLiteFeatureProperties; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -16,6 +17,7 @@ import java.util.List; * 小功能 自动配置 */ @EnableConfigurationProperties({ZooLiteFeatureApiDIYGuideProperties.class, ZooLiteFeatureProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-lite-feature-api.enable", havingValue = "true", matchIfMissing = true) public class ZooLiteFeatureApiAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-msg-api/src/main/java/com/ideaaedi/zoo/diy/feature/msg/api/ZooMsgApiAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-msg-api/src/main/java/com/ideaaedi/zoo/diy/feature/msg/api/ZooMsgApiAutoConfiguration.java index e137a32..b8f4d4f 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-msg-api/src/main/java/com/ideaaedi/zoo/diy/feature/msg/api/ZooMsgApiAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-msg-api/src/main/java/com/ideaaedi/zoo/diy/feature/msg/api/ZooMsgApiAutoConfiguration.java @@ -15,6 +15,7 @@ import com.ideaaedi.zoo.diy.feature.msg.api.sms.core.DefaultSmsSenderManager; import com.ideaaedi.zoo.diy.feature.msg.api.sms.core.SmsSender; import com.ideaaedi.zoo.diy.feature.msg.api.sms.core.SmsSenderManager; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -24,6 +25,7 @@ import java.util.List; * 消息 自动配置 */ @EnableConfigurationProperties({ZooMsgProperties.class, ZooMsgApiDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-msg-api.enable", havingValue = "true", matchIfMissing = true) public class ZooMsgApiAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-audit-log-by-openapi/src/main/java/com/ideaaedi/zoo/diy/feature/auditlog/impl/openapi/ZooAuditLogByOpenapiAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-audit-log-by-openapi/src/main/java/com/ideaaedi/zoo/diy/feature/auditlog/impl/openapi/ZooAuditLogByOpenapiAutoConfiguration.java index 752fd8e..843ef31 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-audit-log-by-openapi/src/main/java/com/ideaaedi/zoo/diy/feature/auditlog/impl/openapi/ZooAuditLogByOpenapiAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-audit-log-by-openapi/src/main/java/com/ideaaedi/zoo/diy/feature/auditlog/impl/openapi/ZooAuditLogByOpenapiAutoConfiguration.java @@ -6,6 +6,7 @@ import com.ideaaedi.zoo.diy.feature.auditlog.impl.openapi.properties.ZooAuditLog import lombok.extern.slf4j.Slf4j; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -15,6 +16,7 @@ import org.springframework.context.annotation.Bean; @Slf4j @AutoConfigureAfter(ZooAuditLogApiAutoConfiguration.class) @EnableConfigurationProperties({ZooAuditLogByOpenapiDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-audit-log-by-openapi.enable", havingValue = "true", matchIfMissing = true) public class ZooAuditLogByOpenapiAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-bpmn-by-flowable/src/main/java/com/ideaaedi/zoo/diy/feature/bpmn/impl/flowable/ZooBpmnByFlowableAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-bpmn-by-flowable/src/main/java/com/ideaaedi/zoo/diy/feature/bpmn/impl/flowable/ZooBpmnByFlowableAutoConfiguration.java index 45ccf66..0ff45a7 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-bpmn-by-flowable/src/main/java/com/ideaaedi/zoo/diy/feature/bpmn/impl/flowable/ZooBpmnByFlowableAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-bpmn-by-flowable/src/main/java/com/ideaaedi/zoo/diy/feature/bpmn/impl/flowable/ZooBpmnByFlowableAutoConfiguration.java @@ -23,6 +23,7 @@ import org.flowable.engine.RepositoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.TaskService; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Lazy; @@ -32,6 +33,7 @@ import org.springframework.context.annotation.Lazy; */ @Slf4j @EnableConfigurationProperties({ZooBpmnByFlowableDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-bpmn-by-flowable.enable", havingValue = "true", matchIfMissing = true) public class ZooBpmnByFlowableAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-config-by-nacos/src/main/java/com/ideaaedi/zoo/diy/feature/config/impl/nacos/ZooConfigNacosAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-config-by-nacos/src/main/java/com/ideaaedi/zoo/diy/feature/config/impl/nacos/ZooConfigNacosAutoConfiguration.java index 19b485f..a940de5 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-config-by-nacos/src/main/java/com/ideaaedi/zoo/diy/feature/config/impl/nacos/ZooConfigNacosAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-config-by-nacos/src/main/java/com/ideaaedi/zoo/diy/feature/config/impl/nacos/ZooConfigNacosAutoConfiguration.java @@ -4,6 +4,7 @@ import com.ideaaedi.zoo.diy.feature.config.impl.nacos.listener.NacosConfigChange import com.ideaaedi.zoo.diy.feature.config.impl.nacos.properties.NacosLoggerLevelProperties; import com.ideaaedi.zoo.diy.feature.config.impl.nacos.properties.ZooConfigNacosDIYGuideProperties; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; @@ -12,6 +13,7 @@ import org.springframework.context.annotation.Bean; * nacos config 自动配置 */ @EnableConfigurationProperties({ZooConfigNacosDIYGuideProperties.class, NacosLoggerLevelProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-config-by-nacos.enable", havingValue = "true", matchIfMissing = true) public class ZooConfigNacosAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-config-by-nacos/src/main/resources/zoo-diy-feature-config-nacos.default.yaml b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-config-by-nacos/src/main/resources/zoo-diy-feature-config-nacos.default.yaml index 66f94eb..cebfa30 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-config-by-nacos/src/main/resources/zoo-diy-feature-config-nacos.default.yaml +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-config-by-nacos/src/main/resources/zoo-diy-feature-config-nacos.default.yaml @@ -2,7 +2,7 @@ zoo: guide: diy: zoo-config-nacos: - order: 1080 + order: 1081 name: "zoo-diy-feature-config-by-nacos" instruction: |- 1.此组件提供基于nacos的配置中心能力支持 diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-expression-engine-by-qlexpress/src/main/java/com/ideaaedi/zoo/diy/feature/expression/engine/impl/qlexpress/ZooQLExpressAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-expression-engine-by-qlexpress/src/main/java/com/ideaaedi/zoo/diy/feature/expression/engine/impl/qlexpress/ZooQLExpressAutoConfiguration.java index 488d97d..46c0af7 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-expression-engine-by-qlexpress/src/main/java/com/ideaaedi/zoo/diy/feature/expression/engine/impl/qlexpress/ZooQLExpressAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-expression-engine-by-qlexpress/src/main/java/com/ideaaedi/zoo/diy/feature/expression/engine/impl/qlexpress/ZooQLExpressAutoConfiguration.java @@ -5,6 +5,7 @@ import com.ideaaedi.zoo.diy.feature.expression.engine.impl.qlexpress.core.QLExpr import com.ideaaedi.zoo.diy.feature.expression.engine.impl.qlexpress.properties.ZooQLExpressDIYGuideProperties; import com.ideaaedi.zoo.diy.feature.expression.engine.impl.qlexpress.properties.ZooQLExpressProperties; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; @@ -13,6 +14,7 @@ import org.springframework.context.annotation.Bean; * QLExpress 自动配置 */ @EnableConfigurationProperties({ZooQLExpressDIYGuideProperties.class, ZooQLExpressProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-expression-engine-by-qlexpress.enable", havingValue = "true", matchIfMissing = true) public class ZooQLExpressAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-field-perm-by-openapi/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/impl/openapi/ZooFpByOpenapiAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-field-perm-by-openapi/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/impl/openapi/ZooFpByOpenapiAutoConfiguration.java index 73f6546..04e07a8 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-field-perm-by-openapi/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/impl/openapi/ZooFpByOpenapiAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-field-perm-by-openapi/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/impl/openapi/ZooFpByOpenapiAutoConfiguration.java @@ -4,6 +4,7 @@ import com.ideaaedi.zoo.diy.feature.fieldperm.impl.openapi.core.OpenapiMethodArg import com.ideaaedi.zoo.diy.feature.fieldperm.impl.openapi.properties.ZooFpByOpenapiDIYGuideProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.core.ParameterNameDiscoverer; @@ -12,6 +13,7 @@ import org.springframework.core.ParameterNameDiscoverer; * 基于openapi的字段权限 自动配置 */ @EnableConfigurationProperties({ZooFpByOpenapiDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-field-perm-by-openapi.enable", havingValue = "true", matchIfMissing = true) public class ZooFpByOpenapiAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-file-by-xfilestorage/src/main/java/com/ideaaedi/zoo/diy/feature/file/impl/xfilestorage/ZooXFileStorageAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-file-by-xfilestorage/src/main/java/com/ideaaedi/zoo/diy/feature/file/impl/xfilestorage/ZooXFileStorageAutoConfiguration.java index d09e849..50428ce 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-file-by-xfilestorage/src/main/java/com/ideaaedi/zoo/diy/feature/file/impl/xfilestorage/ZooXFileStorageAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-file-by-xfilestorage/src/main/java/com/ideaaedi/zoo/diy/feature/file/impl/xfilestorage/ZooXFileStorageAutoConfiguration.java @@ -5,6 +5,7 @@ import com.ideaaedi.zoo.diy.feature.file.impl.xfilestorage.properties.ZooXFileSt import org.dromara.x.file.storage.core.FileStorageService; import org.dromara.x.file.storage.spring.EnableFileStorage; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -13,6 +14,7 @@ import org.springframework.context.annotation.Bean; */ @EnableFileStorage @EnableConfigurationProperties({ZooXFileStorageDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-file-by-xfilestorage.enable", havingValue = "true", matchIfMissing = true) public class ZooXFileStorageAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-i18n-by-spring/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/impl/spring/ZooI18nSpringAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-i18n-by-spring/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/impl/spring/ZooI18nSpringAutoConfiguration.java index 2ff6ce4..7ad6fdf 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-i18n-by-spring/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/impl/spring/ZooI18nSpringAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-i18n-by-spring/src/main/java/com/ideaaedi/zoo/diy/feature/i18n/impl/spring/ZooI18nSpringAutoConfiguration.java @@ -5,6 +5,7 @@ import com.ideaaedi.zoo.diy.feature.i18n.impl.spring.core.ZooI18nSpringLocaleRes import com.ideaaedi.zoo.diy.feature.i18n.impl.spring.properties.ZooI18nSpringDIYGuideProperties; import org.springframework.boot.autoconfigure.AutoConfigureBefore; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.MessageSource; @@ -16,6 +17,7 @@ import org.springframework.web.servlet.DispatcherServlet; */ @AutoConfigureBefore(WebMvcAutoConfiguration.class) @EnableConfigurationProperties({ZooI18nSpringDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-i18n-by-spring.enable", havingValue = "true", matchIfMissing = true) public class ZooI18nSpringAutoConfiguration { @Bean(name = DispatcherServlet.LOCALE_RESOLVER_BEAN_NAME) diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-lite-feature-by-cs/src/main/java/com/ideaaedi/zoo/diy/feature/litefeature/impl/cs/ZooLiteFeatureCsAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-lite-feature-by-cs/src/main/java/com/ideaaedi/zoo/diy/feature/litefeature/impl/cs/ZooLiteFeatureCsAutoConfiguration.java index ac98e1e..c3bcbea 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-lite-feature-by-cs/src/main/java/com/ideaaedi/zoo/diy/feature/litefeature/impl/cs/ZooLiteFeatureCsAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-lite-feature-by-cs/src/main/java/com/ideaaedi/zoo/diy/feature/litefeature/impl/cs/ZooLiteFeatureCsAutoConfiguration.java @@ -5,6 +5,7 @@ import com.ideaaedi.zoo.diy.feature.litefeature.impl.cs.properties.ZooLiteFeatur import org.redisson.api.RedissonClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -13,6 +14,7 @@ import org.springframework.context.annotation.Bean; * 小功能 自动配置 */ @EnableConfigurationProperties(ZooLiteFeatureCsDIYGuideProperties.class) +@ConditionalOnProperty(value = "zoo.switch.feature-lite-feature-by-cs.enable", havingValue = "true", matchIfMissing = true) public class ZooLiteFeatureCsAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-msg-email-by-jakarta/src/main/java/com/ideaaedi/zoo/diy/feature/msg/email/impl/jakarta/ZooEmailJakartaAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-msg-email-by-jakarta/src/main/java/com/ideaaedi/zoo/diy/feature/msg/email/impl/jakarta/ZooEmailJakartaAutoConfiguration.java index a013962..81f71e0 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-msg-email-by-jakarta/src/main/java/com/ideaaedi/zoo/diy/feature/msg/email/impl/jakarta/ZooEmailJakartaAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-msg-email-by-jakarta/src/main/java/com/ideaaedi/zoo/diy/feature/msg/email/impl/jakarta/ZooEmailJakartaAutoConfiguration.java @@ -6,6 +6,7 @@ import com.ideaaedi.zoo.diy.feature.msg.email.impl.jakarta.properties.JakartaMai import com.ideaaedi.zoo.diy.feature.msg.email.impl.jakarta.properties.ZooEmailJakartaDIYGuideProperties; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.AutoConfigureBefore; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -16,6 +17,7 @@ import org.springframework.context.annotation.Bean; @AutoConfigureAfter(ZooMsgApiAutoConfiguration.class) @AutoConfigureBefore(MailSenderAutoConfiguration.class) @EnableConfigurationProperties({ZooEmailJakartaDIYGuideProperties.class, JakartaMailProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-msg-email-by-jakarta.enable", havingValue = "true", matchIfMissing = true) public class ZooEmailJakartaAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-msg-mq-by-rocketmq/src/main/java/com/ideaaedi/zoo/diy/feature/msg/mq/impl/rocketmq/ZooMqRocketmqAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-msg-mq-by-rocketmq/src/main/java/com/ideaaedi/zoo/diy/feature/msg/mq/impl/rocketmq/ZooMqRocketmqAutoConfiguration.java index 6470db6..52d6c22 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-msg-mq-by-rocketmq/src/main/java/com/ideaaedi/zoo/diy/feature/msg/mq/impl/rocketmq/ZooMqRocketmqAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-msg-mq-by-rocketmq/src/main/java/com/ideaaedi/zoo/diy/feature/msg/mq/impl/rocketmq/ZooMqRocketmqAutoConfiguration.java @@ -2,6 +2,7 @@ package com.ideaaedi.zoo.diy.feature.msg.mq.impl.rocketmq; import com.ideaaedi.zoo.diy.feature.msg.mq.impl.rocketmq.core.StreamRocketMQSender; import com.ideaaedi.zoo.diy.feature.msg.mq.impl.rocketmq.properties.ZooMqRocketmqDIYGuideProperties; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.cloud.stream.function.StreamBridge; import org.springframework.context.annotation.Bean; @@ -10,6 +11,7 @@ import org.springframework.context.annotation.Bean; * rocketmq 自动配置 */ @EnableConfigurationProperties({ZooMqRocketmqDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-msg-mq-by-rocketmq.enable", havingValue = "true", matchIfMissing = true) public class ZooMqRocketmqAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-msg-sms-by-sms4j/src/main/java/com/ideaaedi/zoo/diy/feature/msg/sms/impl/sms4j/ZooSmsSms4jAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-msg-sms-by-sms4j/src/main/java/com/ideaaedi/zoo/diy/feature/msg/sms/impl/sms4j/ZooSmsSms4jAutoConfiguration.java index 3094254..c89dfb6 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-msg-sms-by-sms4j/src/main/java/com/ideaaedi/zoo/diy/feature/msg/sms/impl/sms4j/ZooSmsSms4jAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-msg-sms-by-sms4j/src/main/java/com/ideaaedi/zoo/diy/feature/msg/sms/impl/sms4j/ZooSmsSms4jAutoConfiguration.java @@ -63,6 +63,7 @@ import java.util.Optional; DingzhongMultiConfig.class, EmayMultiConfig.class, HuaweiMultiConfig.class, JdcloudMultiConfig.class, LianluMultiConfig.class, NeteaseMultiConfig.class, QiniuMultiConfig.class, TencentMultiConfig.class, UnismsMultiConfig.class, YunpianMultiConfig.class, ZhutongMultiConfig.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-msg-sms-by-sms4j.enable", havingValue = "true", matchIfMissing = true) public class ZooSmsSms4jAutoConfiguration { @Bean diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-reqresp-encdec-by-springmvc/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/impl/springmvc/ZooReByBodyAdviceAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-reqresp-encdec-by-springmvc/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/impl/springmvc/ZooReByBodyAdviceAutoConfiguration.java index 985ef6b..43347e3 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-reqresp-encdec-by-springmvc/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/impl/springmvc/ZooReByBodyAdviceAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-reqresp-encdec-by-springmvc/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/impl/springmvc/ZooReByBodyAdviceAutoConfiguration.java @@ -26,6 +26,7 @@ import java.nio.charset.StandardCharsets; * 请求解密,响应加密 自动配置 */ @EnableConfigurationProperties({ZooReByBodyAdviceDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-reqresp-encdec-by-springmvc.enable", havingValue = "true", matchIfMissing = true) public class ZooReByBodyAdviceAutoConfiguration { @Bean -- Gitee From 02d76acf0564d94cc8024df705b11ed6c197e879 Mon Sep 17 00:00:00 2001 From: JustryDeng <13548417409@com> Date: Sun, 27 Oct 2024 21:44:00 +0800 Subject: [PATCH 04/10] =?UTF-8?q?config=20=3D>=20zoo=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=BB=84=E4=BB=B6=E8=87=AA=E5=8A=A8=E8=A3=85?= =?UTF-8?q?=E9=85=8D=E7=B1=BB=E5=A2=9E=E5=8A=A0=E4=B8=80=E9=94=AE=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E7=A6=81=E7=94=A8=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../file/api/ZooFileApiAutoConfiguration.java | 12 --------- ...ot.autoconfigure.AutoConfiguration.imports | 3 --- ...ZooReqrespEncdecApiAutoConfiguration.java} | 7 ++++-- .../ZooReqrespEncdecApiEnvProcessor.java | 25 +++++++++++++++++++ ...ZooReqrespEncdecApiDIYGuideProperties.java | 16 ++++++++++++ .../main/resources/META-INF/spring.factories | 2 ++ ...ot.autoconfigure.AutoConfiguration.imports | 2 +- ...iy-feature-reqresp-encdec-api.default.yaml | 11 ++++++++ ...ture-reqresp-encdec-springmvc.default.yaml | 2 +- 9 files changed, 61 insertions(+), 19 deletions(-) delete mode 100644 zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-file-api/src/main/java/com/ideaaedi/zoo/diy/feature/file/api/ZooFileApiAutoConfiguration.java delete mode 100644 zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-file-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports rename zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/{ZooReqrespEncdecAutoConfiguration.java => ZooReqrespEncdecApiAutoConfiguration.java} (40%) create mode 100644 zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/processor/ZooReqrespEncdecApiEnvProcessor.java create mode 100644 zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/properties/ZooReqrespEncdecApiDIYGuideProperties.java create mode 100644 zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/resources/META-INF/spring.factories create mode 100644 zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/resources/zoo-diy-feature-reqresp-encdec-api.default.yaml diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-file-api/src/main/java/com/ideaaedi/zoo/diy/feature/file/api/ZooFileApiAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-file-api/src/main/java/com/ideaaedi/zoo/diy/feature/file/api/ZooFileApiAutoConfiguration.java deleted file mode 100644 index 4ff606f..0000000 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-file-api/src/main/java/com/ideaaedi/zoo/diy/feature/file/api/ZooFileApiAutoConfiguration.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.ideaaedi.zoo.diy.feature.file.api; - -import lombok.extern.slf4j.Slf4j; - -/** - * file 自动配置 - */ -@Slf4j -public class ZooFileApiAutoConfiguration { - - -} \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-file-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-file-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 654de57..0000000 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-file-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1,3 +0,0 @@ -# This file is used to import additional auto-configuration classes in Spring Boot 3. -# 每个实现类的全类名单独一行 -com.ideaaedi.zoo.diy.feature.file.api.ZooFileApiAutoConfiguration \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/ZooReqrespEncdecAutoConfiguration.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/ZooReqrespEncdecApiAutoConfiguration.java similarity index 40% rename from zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/ZooReqrespEncdecAutoConfiguration.java rename to zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/ZooReqrespEncdecApiAutoConfiguration.java index bde3770..4f2181f 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/ZooReqrespEncdecAutoConfiguration.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/ZooReqrespEncdecApiAutoConfiguration.java @@ -1,14 +1,17 @@ package com.ideaaedi.zoo.diy.feature.reqresp.encdec.api; +import com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.properties.ZooReqrespEncdecApiDIYGuideProperties; import com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.properties.ZooReqrespEncdecProperties; import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; /** * 请求响应加解密 自动配置 */ @Slf4j -@EnableConfigurationProperties(ZooReqrespEncdecProperties.class) -public class ZooReqrespEncdecAutoConfiguration { +@EnableConfigurationProperties({ZooReqrespEncdecProperties.class, ZooReqrespEncdecApiDIYGuideProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.feature-reqresp-encdec-api.enable", havingValue = "true", matchIfMissing = true) +public class ZooReqrespEncdecApiAutoConfiguration { } \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/processor/ZooReqrespEncdecApiEnvProcessor.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/processor/ZooReqrespEncdecApiEnvProcessor.java new file mode 100644 index 0000000..54878e6 --- /dev/null +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/processor/ZooReqrespEncdecApiEnvProcessor.java @@ -0,0 +1,25 @@ +package com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.processor; + + +import com.ideaaedi.zoo.commonbase.processor.ZooEnvironmentPostProcessor; + +/* + * 默认配置文件加载 + */ +public class ZooReqrespEncdecApiEnvProcessor extends ZooEnvironmentPostProcessor { + + @Override + protected String propertySourceName() { + return "zoo-diy-feature-reqresp-encdec-api.default"; + } + + @Override + protected String propertySourceClasspath() { + return "zoo-diy-feature-reqresp-encdec-api.default.yaml"; + } + + @Override + protected boolean highestPriority() { + return false; + } +} diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/properties/ZooReqrespEncdecApiDIYGuideProperties.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/properties/ZooReqrespEncdecApiDIYGuideProperties.java new file mode 100644 index 0000000..ee4981e --- /dev/null +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/java/com/ideaaedi/zoo/diy/feature/reqresp/encdec/api/properties/ZooReqrespEncdecApiDIYGuideProperties.java @@ -0,0 +1,16 @@ +package com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.properties; + +import com.ideaaedi.zoo.commonbase.info.DefaultDIYGuide; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * (non-javadoc) + * + * @author JustryDeng + * @since 1.0.0 + */ +@ConfigurationProperties(prefix = "zoo.guide.diy.zoo-reqresp-encdec-api") +public class ZooReqrespEncdecApiDIYGuideProperties extends DefaultDIYGuide { + +} diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/resources/META-INF/spring.factories b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..c825bd9 --- /dev/null +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.env.EnvironmentPostProcessor=\ + com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.processor.ZooReqrespEncdecApiEnvProcessor \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index e5e25a1..fb826d7 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,3 +1,3 @@ # This file is used to import additional auto-configuration classes in Spring Boot 3. # 每个实现类的全类名单独一行 -com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.ZooReqrespEncdecAutoConfiguration \ No newline at end of file +com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.ZooReqrespEncdecApiAutoConfiguration \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/resources/zoo-diy-feature-reqresp-encdec-api.default.yaml b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/resources/zoo-diy-feature-reqresp-encdec-api.default.yaml new file mode 100644 index 0000000..9e6a40b --- /dev/null +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-reqresp-encdec-api/src/main/resources/zoo-diy-feature-reqresp-encdec-api.default.yaml @@ -0,0 +1,11 @@ +zoo: + guide: + diy: + zoo-reqresp-encdec-api: + order: 1040 + name: "zoo-diy-feature-reqresp-encdec-api" + instruction: |- + 1.此组件提供请求解密、响应加密通用能力支持 + contacts: + - name: "作者邮箱" + value: "13548417409@163.com" \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-reqresp-encdec-by-springmvc/src/main/resources/zoo-diy-feature-reqresp-encdec-springmvc.default.yaml b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-reqresp-encdec-by-springmvc/src/main/resources/zoo-diy-feature-reqresp-encdec-springmvc.default.yaml index 0cc8ed4..542022a 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-reqresp-encdec-by-springmvc/src/main/resources/zoo-diy-feature-reqresp-encdec-springmvc.default.yaml +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-reqresp-encdec-by-springmvc/src/main/resources/zoo-diy-feature-reqresp-encdec-springmvc.default.yaml @@ -2,7 +2,7 @@ zoo: guide: diy: zoo-reqresp-encdec-springmvc: - order: 1040 + order: 1041 name: "zoo-diy-feature-reqresp-encdec-by-springmvc" instruction: |- 1.此组件提供对接口响应数据进行加的能力支持 -- Gitee From d71568bf09617b3f74ddaac7c52857b325f54852 Mon Sep 17 00:00:00 2001 From: JustryDeng <13548417409@163.com> Date: Mon, 28 Oct 2024 13:46:21 +0800 Subject: [PATCH 05/10] =?UTF-8?q?reform=20=3D>=20=E4=BB=A3=E7=A0=81curd?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=99=A8=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=88=A4?= =?UTF-8?q?=E7=A9=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/default-java-curd/custom_serviceImpl.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zoo-diy-artifact/zoo-diy-artifact-generator/src/main/resources/templates/default-java-curd/custom_serviceImpl.ftl b/zoo-diy-artifact/zoo-diy-artifact-generator/src/main/resources/templates/default-java-curd/custom_serviceImpl.ftl index 8b2eb87..748bc64 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-generator/src/main/resources/templates/default-java-curd/custom_serviceImpl.ftl +++ b/zoo-diy-artifact/zoo-diy-artifact-generator/src/main/resources/templates/default-java-curd/custom_serviceImpl.ftl @@ -146,7 +146,7 @@ public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.m IPage<${entity}> page = this.baseMapper.selectPage(pageInfo, new LambdaQueryWrapper<${entity}>() <#list customAllFields as field> <#if !(ignoreListReqFields?seq_contains("${field.propertyName}"))> - .eq(<#if field.propertyType == "String">${field.propertyName} != null && ${field.propertyName}.trim().length() != 0<#else>${field.propertyName} != null, ${entity}::${getprefix}${field.capitalName}, ${field.propertyName}) + .eq(<#if field.propertyType == "String">${field.propertyName} != null && !${field.propertyName}.trim().isEmpty()<#else>${field.propertyName} != null, ${entity}::${getprefix}${field.capitalName}, ${field.propertyName}) .orderByDesc(${entity}::getId) -- Gitee From b5058edeb1c878ea34555b37cc9eee85d02bf4af Mon Sep 17 00:00:00 2001 From: JustryDeng <13548417409@163.com> Date: Tue, 29 Oct 2024 09:52:59 +0800 Subject: [PATCH 06/10] =?UTF-8?q?reform=20=3D>=20=E5=A4=9A=E7=A7=9F?= =?UTF-8?q?=E6=88=B7like=E6=8F=92=E4=BB=B6=EF=BC=8C=E4=BD=BF=E5=8F=AF?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2null=E7=A7=9F=E6=88=B7=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=8F=AF=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../properties/ZooTenantLikeProperties.java | 14 ++++++++++++++ .../tenant/LikeTenantLineInnerInterceptor.java | 9 +-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/ZooTenantLikeProperties.java b/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/ZooTenantLikeProperties.java index c2cd265..2316a38 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/ZooTenantLikeProperties.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/ZooTenantLikeProperties.java @@ -6,10 +6,14 @@ import com.ideaaedi.zoo.commonbase.util.ZooContext; import com.ideaaedi.zoo.diy.artifact.tenantlike.properties.nested.VisitorTenantInfo; import com.ideaaedi.zoo.diy.artifact.tenantlike.tenant.TenantProvider; import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.NestedConfigurationProperty; +import java.util.HashSet; +import java.util.Set; + /** * 租户相关配置 * @@ -64,4 +68,14 @@ public class ZooTenantLikeProperties { @Valid @NestedConfigurationProperty private VisitorTenantInfo visitor = new VisitorTenantInfo(); + + /** + * 设置哪些表,允许用户查询租户值为null的数据 + *
+     * 可能存在这样的需求:对于个别特殊表,允许所有用户查询tenant为null的数据。
+     *                   此时,我们就可以通过此参数配置相关表
+     * 
+ */ + @NotNull + private Set allowQueryNullTenantTables = new HashSet<>(); } diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/LikeTenantLineInnerInterceptor.java b/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/LikeTenantLineInnerInterceptor.java index 0f65bf3..362530b 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/LikeTenantLineInnerInterceptor.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/LikeTenantLineInnerInterceptor.java @@ -4,7 +4,6 @@ import com.alibaba.fastjson2.JSON; import com.baomidou.mybatisplus.core.toolkit.ExceptionUtils; import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor; -import com.google.common.collect.Sets; import com.ideaaedi.zoo.commonbase.component.tenantlike.DefaultTenantScope; import com.ideaaedi.zoo.commonbase.component.tenantlike.TenantScope; import com.ideaaedi.zoo.commonbase.component.tenantlike.TenantScopeHolder; @@ -50,7 +49,6 @@ import java.util.Collection; import java.util.Comparator; import java.util.List; import java.util.Optional; -import java.util.Set; import java.util.stream.Collectors; /** @@ -62,11 +60,6 @@ import java.util.stream.Collectors; */ public class LikeTenantLineInnerInterceptor extends TenantLineInnerInterceptor { - /** - * 查询有租户的相关表时, 允许查询出租户值为null的表 - */ - private final Set allowQueryNullTenantTables = Sets.newHashSet("sys_dict", "sys_dict_type"); - private final TenantLineHandler tenantLineHandler; private final ZooTenantLikeProperties zooTenantLikeProperties; @@ -307,7 +300,7 @@ public class LikeTenantLineInnerInterceptor extends TenantLineInnerInterceptor { } // step2. 个别特殊表, 允许所有用户查询tenant为null的数据 - if (allowQueryNullTenantTables.contains(name)) { + if (zooTenantLikeProperties.getAllowQueryNullTenantTables().contains(name)) { // 同时允许查询值为null的数据的话,返回Or表达式 IsNullExpression isNullExpression = new IsNullExpression(); isNullExpression.setLeftExpression(aliasColumn); -- Gitee From ab9177086399da4ad69a73a046e769a1373dde57 Mon Sep 17 00:00:00 2001 From: JustryDeng <13548417409@163.com> Date: Tue, 29 Oct 2024 10:26:35 +0800 Subject: [PATCH 07/10] =?UTF-8?q?rename=20=3D>=20zoo-diy-artifact-tenantli?= =?UTF-8?q?ke=E7=BB=84=E4=BB=B6=E9=87=8D=E5=91=BD=E5=90=8D=E4=B8=BAzoo-diy?= =?UTF-8?q?-artifact-tenant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- pom.xml | 2 +- .../DefaultTenantScope.java | 2 +- .../{tenantlike => tenant}/TenantScope.java | 2 +- .../TenantScopeHolder.java | 2 +- .../UserIdAndTenantScope.java | 2 +- .../annotation/Tenant.java | 10 +++--- .../zoo/commonbase/util/ZooContext.java | 4 +-- zoo-diy-artifact/pom.xml | 2 +- .../AbstractPermissionProvider.java | 2 +- .../ZooMybatisPlusAutoConfiguration.java | 2 +- .../pom.xml | 2 +- .../tenant/ZooTenantAutoConfiguration.java} | 36 +++++++++---------- .../tenant}/holder/MybatisPlusInfoHolder.java | 2 +- .../zoo/diy/artifact/tenant}/pakage-info.java | 2 +- .../processor/ZooTenantEnvProcessor.java} | 8 ++--- .../ZooTenantDIYGuideProperties.java} | 6 ++-- .../properties/ZooTenantProperties.java} | 10 +++--- .../properties/nested/VisitorTenantInfo.java | 4 +-- .../LikeTenantLineInnerInterceptor.java | 22 ++++++------ .../tenant}/tenant/TenantProvider.java | 8 ++--- .../tenant}/tenant/TenantScopeAspect.java | 12 +++---- .../tenant}/tenant/VisitorTenantFilter.java | 4 +-- .../main/resources/META-INF/spring.factories | 2 +- ...ot.autoconfigure.AutoConfiguration.imports | 2 +- .../zoo-diy-artifact-tenant.default.yaml} | 6 ++-- .../api/advice/FieldPermValidator.java | 2 +- .../collector/OpenapiAuditLogCollector.java | 2 +- 28 files changed, 81 insertions(+), 81 deletions(-) rename zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/{tenantlike => tenant}/DefaultTenantScope.java (97%) rename zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/{tenantlike => tenant}/TenantScope.java (96%) rename zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/{tenantlike => tenant}/TenantScopeHolder.java (96%) rename zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/{tenantlike => tenant}/UserIdAndTenantScope.java (88%) rename zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/{tenantlike => tenant}/annotation/Tenant.java (87%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like => zoo-diy-artifact-tenant}/pom.xml (95%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/ZooTenantLikeAutoConfiguration.java => zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java} (79%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike => zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant}/holder/MybatisPlusInfoHolder.java (98%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike => zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant}/pakage-info.java (48%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/processor/ZooTenantLikeEnvProcessor.java => zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/processor/ZooTenantEnvProcessor.java} (57%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/ZooTenantLikeDIYGuideProperties.java => zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantDIYGuideProperties.java} (65%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/ZooTenantLikeProperties.java => zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantProperties.java} (89%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike => zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant}/properties/nested/VisitorTenantInfo.java (89%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike => zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant}/tenant/LikeTenantLineInnerInterceptor.java (95%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike => zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant}/tenant/TenantProvider.java (94%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike => zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant}/tenant/TenantScopeAspect.java (92%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike => zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant}/tenant/VisitorTenantFilter.java (95%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like => zoo-diy-artifact-tenant}/src/main/resources/META-INF/spring.factories (41%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like => zoo-diy-artifact-tenant}/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports (64%) rename zoo-diy-artifact/{zoo-diy-artifact-tenant-like/src/main/resources/zoo-diy-artifact-tenant-like.default.yaml => zoo-diy-artifact-tenant/src/main/resources/zoo-diy-artifact-tenant.default.yaml} (91%) diff --git a/README.md b/README.md index 66c046e..8b6a76f 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ zoo-framework
  • zoo-diy-artifact-seata
  • zoo-diy-artifact-shardingsphere
  • zoo-diy-artifact-sse
  • -
  • zoo-diy-artifact-tenant-like
  • +
  • zoo-diy-artifact-tenant
  • zoo-diy-artifact-websocket
  • diff --git a/pom.xml b/pom.xml index d3e2008..e61bcda 100644 --- a/pom.xml +++ b/pom.xml @@ -140,7 +140,7 @@ com.idea-aedi.zoo - zoo-diy-artifact-tenant-like + zoo-diy-artifact-tenant ${revision} diff --git a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/DefaultTenantScope.java b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/DefaultTenantScope.java similarity index 97% rename from zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/DefaultTenantScope.java rename to zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/DefaultTenantScope.java index 8aeb9e4..dfff913 100644 --- a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/DefaultTenantScope.java +++ b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/DefaultTenantScope.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.commonbase.component.tenantlike; +package com.ideaaedi.zoo.commonbase.component.tenant; import com.google.common.collect.Lists; import lombok.Data; diff --git a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/TenantScope.java b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/TenantScope.java similarity index 96% rename from zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/TenantScope.java rename to zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/TenantScope.java index 484ff7d..e794b8a 100644 --- a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/TenantScope.java +++ b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/TenantScope.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.commonbase.component.tenantlike; +package com.ideaaedi.zoo.commonbase.component.tenant; import javax.annotation.Nullable; import java.util.Collection; diff --git a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/TenantScopeHolder.java b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/TenantScopeHolder.java similarity index 96% rename from zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/TenantScopeHolder.java rename to zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/TenantScopeHolder.java index 8714fa9..11f0092 100644 --- a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/TenantScopeHolder.java +++ b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/TenantScopeHolder.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.commonbase.component.tenantlike; +package com.ideaaedi.zoo.commonbase.component.tenant; import com.alibaba.ttl.TransmittableThreadLocal; import lombok.Getter; diff --git a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/UserIdAndTenantScope.java b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/UserIdAndTenantScope.java similarity index 88% rename from zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/UserIdAndTenantScope.java rename to zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/UserIdAndTenantScope.java index 49b6285..eb92c04 100644 --- a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/UserIdAndTenantScope.java +++ b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/UserIdAndTenantScope.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.commonbase.component.tenantlike; +package com.ideaaedi.zoo.commonbase.component.tenant; import javax.annotation.Nonnull; diff --git a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/annotation/Tenant.java b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/annotation/Tenant.java similarity index 87% rename from zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/annotation/Tenant.java rename to zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/annotation/Tenant.java index 63c89a0..2358540 100644 --- a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenantlike/annotation/Tenant.java +++ b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/component/tenant/annotation/Tenant.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.commonbase.component.tenantlike.annotation; +package com.ideaaedi.zoo.commonbase.component.tenant.annotation; import com.ideaaedi.commonds.function.NoArgConsumer; import com.ideaaedi.commonds.function.NoArgFunction; @@ -101,8 +101,8 @@ public @interface Tenant { * 注1: 此模式下,{@link #insertTenant}、{@link #readableTenants}、{@link #modifiableTenants}字段将被忽略 * * 注2:此时,注解效果与直接调用方法 - * {@link com.ideaaedi.zoo.diy.artifact.tenantlike.tenant.TenantProvider#execGlobal}、 - * {@link com.ideaaedi.zoo.diy.artifact.tenantlike.tenant.TenantProvider#voidExecGlobal(NoArgConsumer)} + * {@link com.ideaaedi.zoo.diy.artifact.tenant.tenant.TenantProvider#execGlobal}、 + * {@link com.ideaaedi.zoo.diy.artifact.tenant.tenant.TenantProvider#voidExecGlobal(NoArgConsumer)} * 效果一致 * */ @@ -118,8 +118,8 @@ public @interface Tenant { * 注1: {@link #value}优先级低于{@link #insertTenant}、{@link #readableTenants}、{@link #modifiableTenants} * * 注2:此时,注解效果与直接调用方法 - * {@link com.ideaaedi.zoo.diy.artifact.tenantlike.tenant.TenantProvider#exec(NoArgFunction, String, Collection, Collection)}、 - * {@link com.ideaaedi.zoo.diy.artifact.tenantlike.tenant.TenantProvider#voidExec(NoArgConsumer, String, Collection, Collection)} + * {@link com.ideaaedi.zoo.diy.artifact.tenant.tenant.TenantProvider#exec(NoArgFunction, String, Collection, Collection)}、 + * {@link com.ideaaedi.zoo.diy.artifact.tenant.tenant.TenantProvider#voidExec(NoArgConsumer, String, Collection, Collection)} * 效果一致 * */ diff --git a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/util/ZooContext.java b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/util/ZooContext.java index 4ff51d6..05a70a0 100644 --- a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/util/ZooContext.java +++ b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/util/ZooContext.java @@ -2,8 +2,8 @@ package com.ideaaedi.zoo.commonbase.util; import com.alibaba.ttl.TransmittableThreadLocal; -import com.ideaaedi.zoo.commonbase.component.tenantlike.TenantScope; -import com.ideaaedi.zoo.commonbase.component.tenantlike.UserIdAndTenantScope; +import com.ideaaedi.zoo.commonbase.component.tenant.TenantScope; +import com.ideaaedi.zoo.commonbase.component.tenant.UserIdAndTenantScope; import com.ideaaedi.zoo.commonbase.constant.ZooConstant; import com.ideaaedi.zoo.commonbase.entity.codemsg.ZooBaseCodeMsgEnum; import com.ideaaedi.zoo.commonbase.exception.ZooException; diff --git a/zoo-diy-artifact/pom.xml b/zoo-diy-artifact/pom.xml index fd968bb..afb6330 100644 --- a/zoo-diy-artifact/pom.xml +++ b/zoo-diy-artifact/pom.xml @@ -15,7 +15,7 @@ zoo-diy-artifact-auth-sa-token zoo-diy-artifact-logging-micrometer zoo-diy-artifact-apidoc-knife4j - zoo-diy-artifact-tenant-like + zoo-diy-artifact-tenant zoo-diy-artifact-websocket zoo-diy-artifact-sse zoo-diy-artifact-liteflow diff --git a/zoo-diy-artifact/zoo-diy-artifact-auth-sa-token/src/main/java/com/ideaaedi/zoo/diy/artifact/auth/satoken/permission/AbstractPermissionProvider.java b/zoo-diy-artifact/zoo-diy-artifact-auth-sa-token/src/main/java/com/ideaaedi/zoo/diy/artifact/auth/satoken/permission/AbstractPermissionProvider.java index 565b830..715d2bb 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-auth-sa-token/src/main/java/com/ideaaedi/zoo/diy/artifact/auth/satoken/permission/AbstractPermissionProvider.java +++ b/zoo-diy-artifact/zoo-diy-artifact-auth-sa-token/src/main/java/com/ideaaedi/zoo/diy/artifact/auth/satoken/permission/AbstractPermissionProvider.java @@ -2,7 +2,7 @@ package com.ideaaedi.zoo.diy.artifact.auth.satoken.permission; import cn.dev33.satoken.stp.StpInterface; import com.ideaaedi.zoo.commonbase.component.logging.TraceBaseUtil; -import com.ideaaedi.zoo.commonbase.component.tenantlike.TenantScope; +import com.ideaaedi.zoo.commonbase.component.tenant.TenantScope; import com.ideaaedi.zoo.commonbase.util.ZooContext; import com.ideaaedi.zoo.diy.artifact.auth.satoken.processor.ZooAuthePostProcessor; diff --git a/zoo-diy-artifact/zoo-diy-artifact-mybatis-plus/src/main/java/com/ideaaedi/zoo/diy/artifact/mybatisplus/ZooMybatisPlusAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-mybatis-plus/src/main/java/com/ideaaedi/zoo/diy/artifact/mybatisplus/ZooMybatisPlusAutoConfiguration.java index cf6eec7..2b72f03 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-mybatis-plus/src/main/java/com/ideaaedi/zoo/diy/artifact/mybatisplus/ZooMybatisPlusAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-mybatis-plus/src/main/java/com/ideaaedi/zoo/diy/artifact/mybatisplus/ZooMybatisPlusAutoConfiguration.java @@ -36,7 +36,7 @@ public class ZooMybatisPlusAutoConfiguration { @Bean(name = AutoConfigurationConstant.MYBATIS_PLUS_INTERCEPTOR_BEAN_NAME) @ConditionalOnMissingBean(name = { - AutoConfigurationConstant.ZOO_TENANT_LIKE_AUTO_CONFIGURATION_BEAN_NAME, + AutoConfigurationConstant.ZOO_TENANT_AUTO_CONFIGURATION_BEAN_NAME, AutoConfigurationConstant.MYBATIS_PLUS_INTERCEPTOR_BEAN_NAME }) public MybatisPlusInterceptor mybatisPlusInterceptor(List fullSqlPreparePreHandlers) { diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/pom.xml b/zoo-diy-artifact/zoo-diy-artifact-tenant/pom.xml similarity index 95% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/pom.xml rename to zoo-diy-artifact/zoo-diy-artifact-tenant/pom.xml index e054f5c..fdec501 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/pom.xml +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/pom.xml @@ -9,7 +9,7 @@ ${revision} - zoo-diy-artifact-tenant-like + zoo-diy-artifact-tenant diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/ZooTenantLikeAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java similarity index 79% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/ZooTenantLikeAutoConfiguration.java rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java index 128628b..365938a 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/ZooTenantLikeAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.diy.artifact.tenantlike; +package com.ideaaedi.zoo.diy.artifact.tenant; import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONWriter; @@ -6,20 +6,20 @@ import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; import com.ideaaedi.zoo.commonbase.component.auth.AuthUrlWhitelist; -import com.ideaaedi.zoo.commonbase.component.tenantlike.DefaultTenantScope; -import com.ideaaedi.zoo.commonbase.component.tenantlike.TenantScope; -import com.ideaaedi.zoo.commonbase.component.tenantlike.TenantScopeHolder; +import com.ideaaedi.zoo.commonbase.component.tenant.DefaultTenantScope; +import com.ideaaedi.zoo.commonbase.component.tenant.TenantScope; +import com.ideaaedi.zoo.commonbase.component.tenant.TenantScopeHolder; import com.ideaaedi.zoo.commonbase.constant.AutoConfigurationConstant; import com.ideaaedi.zoo.commonbase.constant.ZooConstant; import com.ideaaedi.zoo.commonbase.util.ZooContext; import com.ideaaedi.zoo.diy.artifact.mybatisplus.handler.FullSqlPreparePreHandler; import com.ideaaedi.zoo.diy.artifact.mybatisplus.interceptor.SqlPreparePreInterceptor; -import com.ideaaedi.zoo.diy.artifact.tenantlike.holder.MybatisPlusInfoHolder; -import com.ideaaedi.zoo.diy.artifact.tenantlike.properties.ZooTenantLikeDIYGuideProperties; -import com.ideaaedi.zoo.diy.artifact.tenantlike.properties.ZooTenantLikeProperties; -import com.ideaaedi.zoo.diy.artifact.tenantlike.tenant.LikeTenantLineInnerInterceptor; -import com.ideaaedi.zoo.diy.artifact.tenantlike.tenant.TenantScopeAspect; -import com.ideaaedi.zoo.diy.artifact.tenantlike.tenant.VisitorTenantFilter; +import com.ideaaedi.zoo.diy.artifact.tenant.holder.MybatisPlusInfoHolder; +import com.ideaaedi.zoo.diy.artifact.tenant.properties.ZooTenantDIYGuideProperties; +import com.ideaaedi.zoo.diy.artifact.tenant.properties.ZooTenantProperties; +import com.ideaaedi.zoo.diy.artifact.tenant.tenant.LikeTenantLineInnerInterceptor; +import com.ideaaedi.zoo.diy.artifact.tenant.tenant.TenantScopeAspect; +import com.ideaaedi.zoo.diy.artifact.tenant.tenant.VisitorTenantFilter; import lombok.extern.slf4j.Slf4j; import net.sf.jsqlparser.expression.Expression; import net.sf.jsqlparser.expression.StringValue; @@ -44,10 +44,10 @@ import java.util.stream.Collectors; */ @Slf4j @Import(TenantScopeAspect.class) -@AutoConfigureOrder(AutoConfigurationConstant.ZOO_TENANT_LIKE_AUTO_CONFIGURATION_ORDER) -@EnableConfigurationProperties({ZooTenantLikeDIYGuideProperties.class, ZooTenantLikeProperties.class}) -@ConditionalOnProperty(value = "zoo.switch.artifact-tenant-like.enable", havingValue = "true", matchIfMissing = true) -public class ZooTenantLikeAutoConfiguration { +@AutoConfigureOrder(AutoConfigurationConstant.ZOO_TENANT_AUTO_CONFIGURATION_ORDER) +@EnableConfigurationProperties({ZooTenantDIYGuideProperties.class, ZooTenantProperties.class}) +@ConditionalOnProperty(value = "zoo.switch.artifact-tenant.enable", havingValue = "true", matchIfMissing = true) +public class ZooTenantAutoConfiguration { @Bean public MybatisPlusInfoHolder mybatisPlusInfoHolder(ApplicationContext applicationContext) { @@ -59,7 +59,7 @@ public class ZooTenantLikeAutoConfiguration { */ @Bean(name = AutoConfigurationConstant.MYBATIS_PLUS_INTERCEPTOR_BEAN_NAME) public MybatisPlusInterceptor mybatisPlusInterceptor(MybatisPlusInfoHolder mybatisPlusInfoHolder, - ZooTenantLikeProperties zooTenantLikeProperties, + ZooTenantProperties zooTenantProperties, List fullSqlPreparePreHandlers) { MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); if (!CollectionUtils.isEmpty(fullSqlPreparePreHandlers)) { @@ -104,7 +104,7 @@ public class ZooTenantLikeAutoConfiguration { } return !tenantTables.contains(tableName); } - }, zooTenantLikeProperties)); + }, zooTenantProperties)); // 分页插件 interceptor.addInnerInterceptor(new PaginationInnerInterceptor()); @@ -115,10 +115,10 @@ public class ZooTenantLikeAutoConfiguration { @Bean @ConditionalOnMissingBean(value = VisitorTenantFilter.class) - public FilterRegistrationBean visitorTenantFilter(ZooTenantLikeProperties zooTenantLikeProperties, + public FilterRegistrationBean visitorTenantFilter(ZooTenantProperties zooTenantProperties, @Autowired(required = false) AuthUrlWhitelist authUrlWhitelist) { FilterRegistrationBean frBean = new FilterRegistrationBean<>(); - frBean.setFilter(new VisitorTenantFilter(zooTenantLikeProperties.getVisitor(), authUrlWhitelist)); + frBean.setFilter(new VisitorTenantFilter(zooTenantProperties.getVisitor(), authUrlWhitelist)); frBean.setOrder(AutoConfigurationConstant.ZOO_VISITOR_TENANT_FILTER_ORDER); frBean.addUrlPatterns("/*"); return frBean; diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/holder/MybatisPlusInfoHolder.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/holder/MybatisPlusInfoHolder.java similarity index 98% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/holder/MybatisPlusInfoHolder.java rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/holder/MybatisPlusInfoHolder.java index f303f59..3300e19 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/holder/MybatisPlusInfoHolder.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/holder/MybatisPlusInfoHolder.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.diy.artifact.tenantlike.holder; +package com.ideaaedi.zoo.diy.artifact.tenant.holder; import com.alibaba.fastjson2.JSON; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/pakage-info.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/pakage-info.java similarity index 48% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/pakage-info.java rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/pakage-info.java index 7aeb999..99b3893 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/pakage-info.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/pakage-info.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.diy.artifact.tenantlike; +package com.ideaaedi.zoo.diy.artifact.tenant; /* * 多租户能力支持,基于mybatis plus */ \ No newline at end of file diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/processor/ZooTenantLikeEnvProcessor.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/processor/ZooTenantEnvProcessor.java similarity index 57% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/processor/ZooTenantLikeEnvProcessor.java rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/processor/ZooTenantEnvProcessor.java index dd83939..09e5101 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/processor/ZooTenantLikeEnvProcessor.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/processor/ZooTenantEnvProcessor.java @@ -1,20 +1,20 @@ -package com.ideaaedi.zoo.diy.artifact.tenantlike.processor; +package com.ideaaedi.zoo.diy.artifact.tenant.processor; import com.ideaaedi.zoo.commonbase.processor.ZooEnvironmentPostProcessor; /* * 默认配置文件加载 */ -public class ZooTenantLikeEnvProcessor extends ZooEnvironmentPostProcessor { +public class ZooTenantEnvProcessor extends ZooEnvironmentPostProcessor { @Override protected String propertySourceName() { - return "zoo-diy-artifact-tenant-like.default"; + return "zoo-diy-artifact-tenant.default"; } @Override protected String propertySourceClasspath() { - return "zoo-diy-artifact-tenant-like.default.yaml"; + return "zoo-diy-artifact-tenant.default.yaml"; } @Override diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/ZooTenantLikeDIYGuideProperties.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantDIYGuideProperties.java similarity index 65% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/ZooTenantLikeDIYGuideProperties.java rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantDIYGuideProperties.java index 696d106..95ee23f 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/ZooTenantLikeDIYGuideProperties.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantDIYGuideProperties.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.diy.artifact.tenantlike.properties; +package com.ideaaedi.zoo.diy.artifact.tenant.properties; import com.ideaaedi.zoo.commonbase.info.DefaultDIYGuide; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -10,7 +10,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; * src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" /> * @since 1.0.0 */ -@ConfigurationProperties(prefix = "zoo.guide.diy.zoo-tenant-like") -public class ZooTenantLikeDIYGuideProperties extends DefaultDIYGuide { +@ConfigurationProperties(prefix = "zoo.guide.diy.zoo-tenant") +public class ZooTenantDIYGuideProperties extends DefaultDIYGuide { } diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/ZooTenantLikeProperties.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantProperties.java similarity index 89% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/ZooTenantLikeProperties.java rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantProperties.java index 2316a38..6fbb1f8 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/ZooTenantLikeProperties.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantProperties.java @@ -1,10 +1,10 @@ -package com.ideaaedi.zoo.diy.artifact.tenantlike.properties; +package com.ideaaedi.zoo.diy.artifact.tenant.properties; import com.ideaaedi.zoo.commonbase.component.auth.AuthUrlWhitelist; -import com.ideaaedi.zoo.commonbase.component.tenantlike.annotation.Tenant; +import com.ideaaedi.zoo.commonbase.component.tenant.annotation.Tenant; import com.ideaaedi.zoo.commonbase.util.ZooContext; -import com.ideaaedi.zoo.diy.artifact.tenantlike.properties.nested.VisitorTenantInfo; -import com.ideaaedi.zoo.diy.artifact.tenantlike.tenant.TenantProvider; +import com.ideaaedi.zoo.diy.artifact.tenant.properties.nested.VisitorTenantInfo; +import com.ideaaedi.zoo.diy.artifact.tenant.tenant.TenantProvider; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; import lombok.Data; @@ -23,7 +23,7 @@ import java.util.Set; */ @Data @ConfigurationProperties(prefix = "zoo.tenant") -public class ZooTenantLikeProperties { +public class ZooTenantProperties { /** * 作为bizTenant的tenant的层级 diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/nested/VisitorTenantInfo.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/nested/VisitorTenantInfo.java similarity index 89% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/nested/VisitorTenantInfo.java rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/nested/VisitorTenantInfo.java index 7cef05e..9aa6b66 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/properties/nested/VisitorTenantInfo.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/nested/VisitorTenantInfo.java @@ -1,6 +1,6 @@ -package com.ideaaedi.zoo.diy.artifact.tenantlike.properties.nested; +package com.ideaaedi.zoo.diy.artifact.tenant.properties.nested; -import com.ideaaedi.zoo.commonbase.component.tenantlike.UserIdAndTenantScope; +import com.ideaaedi.zoo.commonbase.component.tenant.UserIdAndTenantScope; import lombok.Data; import javax.annotation.Nonnull; diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/LikeTenantLineInnerInterceptor.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/tenant/LikeTenantLineInnerInterceptor.java similarity index 95% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/LikeTenantLineInnerInterceptor.java rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/tenant/LikeTenantLineInnerInterceptor.java index 362530b..0b8a68a 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/LikeTenantLineInnerInterceptor.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/tenant/LikeTenantLineInnerInterceptor.java @@ -1,17 +1,17 @@ -package com.ideaaedi.zoo.diy.artifact.tenantlike.tenant; +package com.ideaaedi.zoo.diy.artifact.tenant.tenant; import com.alibaba.fastjson2.JSON; import com.baomidou.mybatisplus.core.toolkit.ExceptionUtils; import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor; -import com.ideaaedi.zoo.commonbase.component.tenantlike.DefaultTenantScope; -import com.ideaaedi.zoo.commonbase.component.tenantlike.TenantScope; -import com.ideaaedi.zoo.commonbase.component.tenantlike.TenantScopeHolder; +import com.ideaaedi.zoo.commonbase.component.tenant.DefaultTenantScope; +import com.ideaaedi.zoo.commonbase.component.tenant.TenantScope; +import com.ideaaedi.zoo.commonbase.component.tenant.TenantScopeHolder; import com.ideaaedi.zoo.commonbase.constant.ZooConstant; import com.ideaaedi.zoo.commonbase.entity.codemsg.ZooBaseCodeMsgEnum; import com.ideaaedi.zoo.commonbase.exception.ZooException; import com.ideaaedi.zoo.commonbase.util.ZooContext; -import com.ideaaedi.zoo.diy.artifact.tenantlike.properties.ZooTenantLikeProperties; +import com.ideaaedi.zoo.diy.artifact.tenant.properties.ZooTenantProperties; import net.sf.jsqlparser.expression.BinaryExpression; import net.sf.jsqlparser.expression.DoubleValue; import net.sf.jsqlparser.expression.Expression; @@ -62,13 +62,13 @@ public class LikeTenantLineInnerInterceptor extends TenantLineInnerInterceptor { private final TenantLineHandler tenantLineHandler; - private final ZooTenantLikeProperties zooTenantLikeProperties; + private final ZooTenantProperties zooTenantProperties; public LikeTenantLineInnerInterceptor(TenantLineHandler tenantLineHandler, - ZooTenantLikeProperties zooTenantLikeProperties) { + ZooTenantProperties zooTenantProperties) { super(tenantLineHandler); this.tenantLineHandler = tenantLineHandler; - this.zooTenantLikeProperties = zooTenantLikeProperties; + this.zooTenantProperties = zooTenantProperties; } @Override @@ -154,7 +154,7 @@ public class LikeTenantLineInnerInterceptor extends TenantLineInnerInterceptor { @Override protected void processDelete(Delete delete, int index, String sql, Object obj) { - if (zooTenantLikeProperties.isForceIgnoreUrd()) { + if (zooTenantProperties.isForceIgnoreUrd()) { return; } if (shouldIgnoreTenant(false)) { @@ -165,7 +165,7 @@ public class LikeTenantLineInnerInterceptor extends TenantLineInnerInterceptor { @Override protected void processUpdate(Update update, int index, String sql, Object obj) { - if (zooTenantLikeProperties.isForceIgnoreUrd()) { + if (zooTenantProperties.isForceIgnoreUrd()) { return; } if (shouldIgnoreTenant(false)) { @@ -300,7 +300,7 @@ public class LikeTenantLineInnerInterceptor extends TenantLineInnerInterceptor { } // step2. 个别特殊表, 允许所有用户查询tenant为null的数据 - if (zooTenantLikeProperties.getAllowQueryNullTenantTables().contains(name)) { + if (zooTenantProperties.getAllowQueryNullTenantTables().contains(name)) { // 同时允许查询值为null的数据的话,返回Or表达式 IsNullExpression isNullExpression = new IsNullExpression(); isNullExpression.setLeftExpression(aliasColumn); diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/TenantProvider.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/tenant/TenantProvider.java similarity index 94% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/TenantProvider.java rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/tenant/TenantProvider.java index dfba217..aec9696 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/TenantProvider.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/tenant/TenantProvider.java @@ -1,11 +1,11 @@ -package com.ideaaedi.zoo.diy.artifact.tenantlike.tenant; +package com.ideaaedi.zoo.diy.artifact.tenant.tenant; import com.google.common.collect.Sets; import com.ideaaedi.commonds.function.NoArgConsumer; import com.ideaaedi.commonds.function.NoArgFunction; -import com.ideaaedi.zoo.commonbase.component.tenantlike.DefaultTenantScope; -import com.ideaaedi.zoo.commonbase.component.tenantlike.TenantScope; -import com.ideaaedi.zoo.commonbase.component.tenantlike.TenantScopeHolder; +import com.ideaaedi.zoo.commonbase.component.tenant.DefaultTenantScope; +import com.ideaaedi.zoo.commonbase.component.tenant.TenantScope; +import com.ideaaedi.zoo.commonbase.component.tenant.TenantScopeHolder; import com.ideaaedi.zoo.commonbase.util.ZooContext; import javax.annotation.Nonnull; diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/TenantScopeAspect.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/tenant/TenantScopeAspect.java similarity index 92% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/TenantScopeAspect.java rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/tenant/TenantScopeAspect.java index b60fa37..53a81e3 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/TenantScopeAspect.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/tenant/TenantScopeAspect.java @@ -1,10 +1,10 @@ -package com.ideaaedi.zoo.diy.artifact.tenantlike.tenant; +package com.ideaaedi.zoo.diy.artifact.tenant.tenant; import com.google.common.collect.Lists; -import com.ideaaedi.zoo.commonbase.component.tenantlike.DefaultTenantScope; -import com.ideaaedi.zoo.commonbase.component.tenantlike.TenantScope; -import com.ideaaedi.zoo.commonbase.component.tenantlike.TenantScopeHolder; -import com.ideaaedi.zoo.commonbase.component.tenantlike.annotation.Tenant; +import com.ideaaedi.zoo.commonbase.component.tenant.DefaultTenantScope; +import com.ideaaedi.zoo.commonbase.component.tenant.TenantScope; +import com.ideaaedi.zoo.commonbase.component.tenant.TenantScopeHolder; +import com.ideaaedi.zoo.commonbase.component.tenant.annotation.Tenant; import com.ideaaedi.zoo.commonbase.util.SpelUtil; import com.ideaaedi.zoo.commonbase.util.ZooContext; import lombok.extern.slf4j.Slf4j; @@ -26,7 +26,7 @@ import java.util.concurrent.ConcurrentLinkedDeque; import java.util.stream.Collectors; /** - * 对{@link com.ideaaedi.zoo.commonbase.component.tenantlike.annotation.Tenant}进行支持实现 + * 对{@link com.ideaaedi.zoo.commonbase.component.tenant.annotation.Tenant}进行支持实现 * * @author JustryDeng diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/VisitorTenantFilter.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/tenant/VisitorTenantFilter.java similarity index 95% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/VisitorTenantFilter.java rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/tenant/VisitorTenantFilter.java index 4bde93f..db96467 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/java/com/ideaaedi/zoo/diy/artifact/tenantlike/tenant/VisitorTenantFilter.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/tenant/VisitorTenantFilter.java @@ -1,8 +1,8 @@ -package com.ideaaedi.zoo.diy.artifact.tenantlike.tenant; +package com.ideaaedi.zoo.diy.artifact.tenant.tenant; import com.ideaaedi.zoo.commonbase.component.auth.AuthUrlWhitelist; import com.ideaaedi.zoo.commonbase.util.ZooContext; -import com.ideaaedi.zoo.diy.artifact.tenantlike.properties.nested.VisitorTenantInfo; +import com.ideaaedi.zoo.diy.artifact.tenant.properties.nested.VisitorTenantInfo; import jakarta.servlet.Filter; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/resources/META-INF/spring.factories b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/resources/META-INF/spring.factories similarity index 41% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/resources/META-INF/spring.factories rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/resources/META-INF/spring.factories index 4a02735..490e858 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/resources/META-INF/spring.factories +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/resources/META-INF/spring.factories @@ -1,2 +1,2 @@ org.springframework.boot.env.EnvironmentPostProcessor=\ - com.ideaaedi.zoo.diy.artifact.tenantlike.processor.ZooTenantLikeEnvProcessor \ No newline at end of file + com.ideaaedi.zoo.diy.artifact.tenant.processor.ZooTenantEnvProcessor \ No newline at end of file diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports similarity index 64% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 24f76ba..4d8ff36 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,3 +1,3 @@ # This file is used to import additional auto-configuration classes in Spring Boot 3. # 每个实现类的全类名单独一行 -com.ideaaedi.zoo.diy.artifact.tenantlike.ZooTenantLikeAutoConfiguration \ No newline at end of file +com.ideaaedi.zoo.diy.artifact.tenant.ZooTenantAutoConfiguration \ No newline at end of file diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/resources/zoo-diy-artifact-tenant-like.default.yaml b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/resources/zoo-diy-artifact-tenant.default.yaml similarity index 91% rename from zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/resources/zoo-diy-artifact-tenant-like.default.yaml rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/resources/zoo-diy-artifact-tenant.default.yaml index eb32c8c..bdbdd01 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant-like/src/main/resources/zoo-diy-artifact-tenant-like.default.yaml +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/resources/zoo-diy-artifact-tenant.default.yaml @@ -1,9 +1,9 @@ zoo: guide: diy: - zoo-tenant-like: + zoo-tenant: order: 20 - name: "zoo-diy-artifact-tenant-like" + name: "zoo-diy-artifact-tenant" instruction: |- 1.此组件提供基于mybatis-plus的多租户能力支持 manual: |- @@ -37,4 +37,4 @@ zoo: logging: level: - com.ideaaedi.zoo.diy.artifact.tenantlike.tenant.LikeTenantLineInnerInterceptor: info \ No newline at end of file + com.ideaaedi.zoo.diy.artifact.tenant.tenant.LikeTenantLineInnerInterceptor: info \ No newline at end of file diff --git a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/api/advice/FieldPermValidator.java b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/api/advice/FieldPermValidator.java index f520204..9e65366 100644 --- a/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/api/advice/FieldPermValidator.java +++ b/zoo-diy-feature/zoo-diy-feature-api/zoo-diy-feature-field-perm-api/src/main/java/com/ideaaedi/zoo/diy/feature/fieldperm/api/advice/FieldPermValidator.java @@ -34,7 +34,7 @@ import java.util.concurrent.ConcurrentHashMap; * src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" /> * @since 1.0.0 */ -public class FieldPermValidator implements ApplicationListener, MethodInterceptor, Ordered { +public class FieldPermValidator implements ApplicationListener, MethodInterceptor, Ordered { private boolean contextAlreadyRefreshed = false; diff --git a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-audit-log-by-openapi/src/main/java/com/ideaaedi/zoo/diy/feature/auditlog/impl/openapi/collector/OpenapiAuditLogCollector.java b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-audit-log-by-openapi/src/main/java/com/ideaaedi/zoo/diy/feature/auditlog/impl/openapi/collector/OpenapiAuditLogCollector.java index abde3a3..07534e0 100644 --- a/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-audit-log-by-openapi/src/main/java/com/ideaaedi/zoo/diy/feature/auditlog/impl/openapi/collector/OpenapiAuditLogCollector.java +++ b/zoo-diy-feature/zoo-diy-feature-impl/zoo-diy-feature-audit-log-by-openapi/src/main/java/com/ideaaedi/zoo/diy/feature/auditlog/impl/openapi/collector/OpenapiAuditLogCollector.java @@ -167,7 +167,7 @@ public class OpenapiAuditLogCollector implements AuditLogCollector { operationInfo = summary; } if (StringUtils.isNotBlank(description)) { - if (operationInfo.length() > 0) { + if (!operationInfo.isEmpty()) { operationInfo = operationInfo + "\t"; } operationInfo = operationInfo + description; -- Gitee From ab9b4d534f255fafee9d682ee3efd5e0d148e5e1 Mon Sep 17 00:00:00 2001 From: JustryDeng <13548417409@163.com> Date: Tue, 29 Oct 2024 10:27:10 +0800 Subject: [PATCH 08/10] =?UTF-8?q?reform=20=3D>=20=E5=AE=8C=E5=96=84javadoc?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=BF=AB=E9=80=9F=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constant/AutoConfigurationConstant.java | 56 +++++++++++-------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/constant/AutoConfigurationConstant.java b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/constant/AutoConfigurationConstant.java index cd32855..1db3259 100644 --- a/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/constant/AutoConfigurationConstant.java +++ b/zoo-common-base/src/main/java/com/ideaaedi/zoo/commonbase/constant/AutoConfigurationConstant.java @@ -11,92 +11,104 @@ import org.springframework.core.Ordered; public interface AutoConfigurationConstant { /** - * order for ZooMybatisPlusAutoConfiguration + * order for {@link com.ideaaedi.zoo.diy.artifact.mybatisplus.ZooMybatisPlusAutoConfiguration} */ int ZOO_MYBATIS_PLUS_AUTO_CONFIGURATION_ORDER = 100; /** - * order for ZooTenantLikeAutoConfiguration + * order for {@link com.ideaaedi.zoo.diy.artifact.tenant.ZooTenantAutoConfiguration} */ - int ZOO_TENANT_LIKE_AUTO_CONFIGURATION_ORDER = ZOO_MYBATIS_PLUS_AUTO_CONFIGURATION_ORDER - 1; + int ZOO_TENANT_AUTO_CONFIGURATION_ORDER = ZOO_MYBATIS_PLUS_AUTO_CONFIGURATION_ORDER - 1; /** - * bean-name for ZooTenantLikeAutoConfiguration + * bean-name for {@link com.ideaaedi.zoo.diy.artifact.tenant.ZooTenantAutoConfiguration} */ - String ZOO_TENANT_LIKE_AUTO_CONFIGURATION_BEAN_NAME = "com.ideaaedi.zoo.diy.artifact.tenantlike.ZooTenantLikeAutoConfiguration"; + String ZOO_TENANT_AUTO_CONFIGURATION_BEAN_NAME = "com.ideaaedi.zoo.diy.artifact.tenant.ZooTenantAutoConfiguration"; /** - * bean-name for MybatisPlusInterceptor + * bean-name for {@link com.ideaaedi.zoo.diy.artifact.mybatisplus.ZooMybatisPlusAutoConfiguration#mybatisPlusInterceptor} */ String MYBATIS_PLUS_INTERCEPTOR_BEAN_NAME = "mybatisPlusInterceptor"; - /* - * order for logging.micrometer TraceXdFilter + /** + * order for {@link com.ideaaedi.zoo.diy.artifact.logging.micrometer.filter.TraceXdFilter} */ int ZOO_LOGGING_MICROMETER_PRIORITY_ORDER = Ordered.HIGHEST_PRECEDENCE; - /* + /** * order for sa-token SaServletFilter + * @see com.ideaaedi.zoo.diy.artifact.auth.satoken.ZooSaTokenAutoConfiguration#saServletFilter */ int ZOO_SA_TOKEN_AUTH_FILTER_ORDER = 100; - /* + /** * order for request-decrypt SaServletFilter + * @see com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.properties.nested.ReqDecryptProperties#order */ int ZOO_REQ_DECRYPT_FILTER_ORDER = ZOO_SA_TOKEN_AUTH_FILTER_ORDER + 1; - /* + /** * order for VisitorTenantFilter + * @see com.ideaaedi.zoo.diy.artifact.tenant.ZooTenantAutoConfiguration#visitorTenantFilter */ int ZOO_VISITOR_TENANT_FILTER_ORDER = ZOO_SA_TOKEN_AUTH_FILTER_ORDER + 2; - /* + /** * order for response-encrypt response-body advice + * @see com.ideaaedi.zoo.diy.feature.reqresp.encdec.api.properties.nested.RespEncryptProperties#order */ int ZOO_RESP_ENCRYPT_FILTER_ORDER = Ordered.LOWEST_PRECEDENCE - 100; - /* + /** * order for audit log + * @see com.ideaaedi.zoo.diy.feature.auditlog.api.advice.AuditLogPointcutAdvisor#setOrder */ int ZOO_AUDIT_LOG_COLLECTOR_ORDER = Ordered.HIGHEST_PRECEDENCE + 100; - /* + /** * order for field permission + * @see com.ideaaedi.zoo.diy.feature.fieldperm.api.advice.FieldPermValidator */ int ZOO_FIELD_PERM_VALIDATOR_ORDER = Ordered.HIGHEST_PRECEDENCE + 200; - /* + /** * order for field LockAdvice + * @see com.ideaaedi.zoo.diy.feature.litefeature.api.lock.LockAdvice */ int ZOO_LITE_FEATURE_LOCK_ADVICE_ORDER = Ordered.HIGHEST_PRECEDENCE + 10000; - /* + /** * grayscale + * @see com.ideaaedi.zoo.diy.artifact.grayscale.aspect.advice.GrayscaleAspect */ int ZOO_GRAYSCALE_ASPECT_ORDER = Ordered.LOWEST_PRECEDENCE - 100; - /* + /** * order for expression interceptor + * @see com.ideaaedi.zoo.diy.feature.expression.engine.api.advice.ExpressionReplaceInterceptor */ int ZOO_EXPRESSION_INTERCEPTOR_ORDER = Ordered.LOWEST_PRECEDENCE - 1; - /* - * order for ZooKnife4jAutoConfiguration + /** + * order for + * @see com.ideaaedi.zoo.diy.artifact.apidoc.knife4j.ZooKnife4jAutoConfiguration */ int ZOO_KNIFE4J_AUTO_CONFIGURATION_ORDER = 0; - /* - * order for ZooGeneratorAutoConfiguration + /** + * order for + * @see com.ideaaedi.zoo.diy.artifact.generator.ZooGeneratorAutoConfiguration */ int ZOO_GENERATOR_AUTO_CONFIGURATION_ORDER = ZOO_MYBATIS_PLUS_AUTO_CONFIGURATION_ORDER + 1; /** - * ZooKnife4jAutoConfiguration 的全类名 + * {@link com.ideaaedi.zoo.diy.artifact.apidoc.knife4j.ZooKnife4jAutoConfiguration}的全类名 */ String ZOO_KNIFE4J_AUTO_CONFIGURATION_CLASS_LONG_NAME = "com.ideaaedi.zoo.diy.artifact.apidoc.knife4j.ZooKnife4jAutoConfiguration"; /** * jackson序列化配置类类名 + * @see com.ideaaedi.zoo.diy.artifact.magicapi.ZooMagicApiAutoConfiguration#jackson2ObjectMapperBuilderCustomizer */ String JACKSON_MAPPER_CUSTOMIZER_BEAN_NAME = "jackson2ObjectMapperBuilderCustomizer"; } -- Gitee From 2db9d373b388b18a85f5fa8601d2700cfe32fa7f Mon Sep 17 00:00:00 2001 From: JustryDeng <13548417409@163.com> Date: Tue, 29 Oct 2024 10:40:57 +0800 Subject: [PATCH 09/10] =?UTF-8?q?reform=20=3D>=20=E5=A4=9A=E7=A7=9F?= =?UTF-8?q?=E6=88=B7=E6=8F=92=E4=BB=B6=E9=A2=84=E7=95=99=E5=85=B6=E4=BD=99?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=EF=BC=8C=E5=8F=AF=E9=80=9A=E8=BF=87=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=BF=9B=E8=A1=8C=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tenant/ZooTenantAutoConfiguration.java | 91 +++++++++++-------- .../tenant/properties/TenantModeEnum.java | 28 ++++++ .../properties/ZooTenantProperties.java | 6 ++ 3 files changed, 85 insertions(+), 40 deletions(-) create mode 100644 zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/TenantModeEnum.java diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java index 365938a..4ddac47 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java @@ -15,6 +15,7 @@ import com.ideaaedi.zoo.commonbase.util.ZooContext; import com.ideaaedi.zoo.diy.artifact.mybatisplus.handler.FullSqlPreparePreHandler; import com.ideaaedi.zoo.diy.artifact.mybatisplus.interceptor.SqlPreparePreInterceptor; import com.ideaaedi.zoo.diy.artifact.tenant.holder.MybatisPlusInfoHolder; +import com.ideaaedi.zoo.diy.artifact.tenant.properties.TenantModeEnum; import com.ideaaedi.zoo.diy.artifact.tenant.properties.ZooTenantDIYGuideProperties; import com.ideaaedi.zoo.diy.artifact.tenant.properties.ZooTenantProperties; import com.ideaaedi.zoo.diy.artifact.tenant.tenant.LikeTenantLineInnerInterceptor; @@ -65,46 +66,56 @@ public class ZooTenantAutoConfiguration { if (!CollectionUtils.isEmpty(fullSqlPreparePreHandlers)) { interceptor.addInnerInterceptor(new SqlPreparePreInterceptor(fullSqlPreparePreHandlers)); } - // 租户插件 - interceptor.addInnerInterceptor(new LikeTenantLineInnerInterceptor(new TenantLineHandler() { - @Override - public Expression getTenantId() { - // 先从会话级临时数据域中查 - TenantScope tenantScope = TenantScopeHolder.SESSION_DATA_SCOPE_HOLDER.get().peekFirst(); - // 在从用户登录态中查 - if (tenantScope == null) { - tenantScope = ZooContext.TenantCt.currTenantScope(); - } - Objects.requireNonNull(tenantScope, "getTenantId fail. tenantScope cannot be null."); - return new StringValue( - JSON.toJSONString( - DefaultTenantScope.of( - tenantScope.insertTenant(), - tenantScope.readableTenants(), - tenantScope.modifiableTenants() - ), - JSONWriter.Feature.NotWriteDefaultValue - ) - ); - } - - @Override - public String getTenantIdColumn() { - return ZooConstant.TENANT_COLUMN_NAME; - } - - @Override - public boolean ignoreTable(String tableName) { - Set tenantTables = mybatisPlusInfoHolder.getTenantTables(); - if (CollectionUtils.isEmpty(tenantTables)) { - return true; - } - if (tableName.contains(ZooConstant.MYSQL_ANTI_ESCAPE)) { - tableName = tableName.replace(ZooConstant.MYSQL_ANTI_ESCAPE, ZooConstant.EMPTY); - } - return !tenantTables.contains(tableName); - } - }, zooTenantProperties)); + TenantModeEnum tenantMode = zooTenantProperties.getMode(); + switch (tenantMode) { + case LIKE_RIGHT: + // 租户插件 + interceptor.addInnerInterceptor(new LikeTenantLineInnerInterceptor(new TenantLineHandler() { + @Override + public Expression getTenantId() { + // 先从会话级临时数据域中查 + TenantScope tenantScope = TenantScopeHolder.SESSION_DATA_SCOPE_HOLDER.get().peekFirst(); + // 在从用户登录态中查 + if (tenantScope == null) { + tenantScope = ZooContext.TenantCt.currTenantScope(); + } + Objects.requireNonNull(tenantScope, "getTenantId fail. tenantScope cannot be null."); + return new StringValue( + JSON.toJSONString( + DefaultTenantScope.of( + tenantScope.insertTenant(), + tenantScope.readableTenants(), + tenantScope.modifiableTenants() + ), + JSONWriter.Feature.NotWriteDefaultValue + ) + ); + } + + @Override + public String getTenantIdColumn() { + return ZooConstant.TENANT_COLUMN_NAME; + } + + @Override + public boolean ignoreTable(String tableName) { + Set tenantTables = mybatisPlusInfoHolder.getTenantTables(); + if (CollectionUtils.isEmpty(tenantTables)) { + return true; + } + if (tableName.contains(ZooConstant.MYSQL_ANTI_ESCAPE)) { + tableName = tableName.replace(ZooConstant.MYSQL_ANTI_ESCAPE, ZooConstant.EMPTY); + } + return !tenantTables.contains(tableName); + } + }, zooTenantProperties)); + break; + case IN_EQUALS: + throw new UnsupportedOperationException("Not supported at this time tenantMode '" + tenantMode + "'."); + ///break; + default: + throw new UnsupportedOperationException("non-support tenantMode '" + tenantMode + "'."); + } // 分页插件 interceptor.addInnerInterceptor(new PaginationInnerInterceptor()); diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/TenantModeEnum.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/TenantModeEnum.java new file mode 100644 index 0000000..cdc7df3 --- /dev/null +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/TenantModeEnum.java @@ -0,0 +1,28 @@ +package com.ideaaedi.zoo.diy.artifact.tenant.properties; + +import com.ideaaedi.zoo.commonbase.enums.EnumDescriptor; + +/** + * 租户模式 + * + * @author JustryDeng + * @since 1.0.0 + */ +public enum TenantModeEnum implements EnumDescriptor { + + LIKE_RIGHT("filter tenant by 'LIKE xxx%'"), + + IN_EQUALS("filter tenant by 'IN (xxx)', if there is only one, use '= xxx'"); + + private final String desc; + + TenantModeEnum(String desc) { + this.desc = desc; + } + + @Override + public String obtainDescription() { + return this.desc; + } +} diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantProperties.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantProperties.java index 6fbb1f8..a522bec 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantProperties.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantProperties.java @@ -25,6 +25,12 @@ import java.util.Set; @ConfigurationProperties(prefix = "zoo.tenant") public class ZooTenantProperties { + /** + * 租户过滤模式 + */ + @NotNull + private TenantModeEnum mode = TenantModeEnum.LIKE_RIGHT; + /** * 作为bizTenant的tenant的层级 *

    -- Gitee From da132029406241f73ba80f29c847af9e1de1d831 Mon Sep 17 00:00:00 2001 From: JustryDeng <13548417409@163.com> Date: Tue, 29 Oct 2024 10:54:30 +0800 Subject: [PATCH 10/10] =?UTF-8?q?reform=20=3D>=20=E5=A4=9A=E7=A7=9F?= =?UTF-8?q?=E6=88=B7=E6=8F=92=E4=BB=B6=E9=A2=84=E7=95=99=E5=85=B6=E4=BD=99?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=EF=BC=8C=E5=8F=AF=E9=80=9A=E8=BF=87=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=BF=9B=E8=A1=8C=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java | 2 +- .../zoo/diy/artifact/tenant/properties/ZooTenantProperties.java | 1 + .../artifact/tenant/properties/{ => nested}/TenantModeEnum.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/{ => nested}/TenantModeEnum.java (91%) diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java index 4ddac47..8ac38a2 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/ZooTenantAutoConfiguration.java @@ -15,9 +15,9 @@ import com.ideaaedi.zoo.commonbase.util.ZooContext; import com.ideaaedi.zoo.diy.artifact.mybatisplus.handler.FullSqlPreparePreHandler; import com.ideaaedi.zoo.diy.artifact.mybatisplus.interceptor.SqlPreparePreInterceptor; import com.ideaaedi.zoo.diy.artifact.tenant.holder.MybatisPlusInfoHolder; -import com.ideaaedi.zoo.diy.artifact.tenant.properties.TenantModeEnum; import com.ideaaedi.zoo.diy.artifact.tenant.properties.ZooTenantDIYGuideProperties; import com.ideaaedi.zoo.diy.artifact.tenant.properties.ZooTenantProperties; +import com.ideaaedi.zoo.diy.artifact.tenant.properties.nested.TenantModeEnum; import com.ideaaedi.zoo.diy.artifact.tenant.tenant.LikeTenantLineInnerInterceptor; import com.ideaaedi.zoo.diy.artifact.tenant.tenant.TenantScopeAspect; import com.ideaaedi.zoo.diy.artifact.tenant.tenant.VisitorTenantFilter; diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantProperties.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantProperties.java index a522bec..eb20c34 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantProperties.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/ZooTenantProperties.java @@ -3,6 +3,7 @@ package com.ideaaedi.zoo.diy.artifact.tenant.properties; import com.ideaaedi.zoo.commonbase.component.auth.AuthUrlWhitelist; import com.ideaaedi.zoo.commonbase.component.tenant.annotation.Tenant; import com.ideaaedi.zoo.commonbase.util.ZooContext; +import com.ideaaedi.zoo.diy.artifact.tenant.properties.nested.TenantModeEnum; import com.ideaaedi.zoo.diy.artifact.tenant.properties.nested.VisitorTenantInfo; import com.ideaaedi.zoo.diy.artifact.tenant.tenant.TenantProvider; import jakarta.validation.Valid; diff --git a/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/TenantModeEnum.java b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/nested/TenantModeEnum.java similarity index 91% rename from zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/TenantModeEnum.java rename to zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/nested/TenantModeEnum.java index cdc7df3..f37700e 100644 --- a/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/TenantModeEnum.java +++ b/zoo-diy-artifact/zoo-diy-artifact-tenant/src/main/java/com/ideaaedi/zoo/diy/artifact/tenant/properties/nested/TenantModeEnum.java @@ -1,4 +1,4 @@ -package com.ideaaedi.zoo.diy.artifact.tenant.properties; +package com.ideaaedi.zoo.diy.artifact.tenant.properties.nested; import com.ideaaedi.zoo.commonbase.enums.EnumDescriptor; -- Gitee