From 430c1ca788fee19331e3f32c9fa36cb77df76549 Mon Sep 17 00:00:00 2001 From: liaozan <378024053@qq.com> Date: Mon, 12 Jun 2023 21:23:14 +0800 Subject: [PATCH] Restore dubbo register logger level --- .../dubbo/properties/DubboProperties.java | 3 + .../spring-configuration-metadata.json | 121 ++++++++++++++++++ ...ultPropertiesEnvironmentPostProcessor.java | 4 +- 3 files changed, 126 insertions(+), 2 deletions(-) diff --git a/starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/properties/DubboProperties.java b/starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/properties/DubboProperties.java index d0922a5..d2a750b 100644 --- a/starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/properties/DubboProperties.java +++ b/starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/properties/DubboProperties.java @@ -56,6 +56,9 @@ public class DubboProperties implements ConfigurableProperties { @NestedConfigurationProperty private TracingConfig tracing = new TracingConfig(); + @NestedConfigurationProperty + private SslConfig ssl = new SslConfig(); + @Override public String getNamespace() { return "dubbo-common"; diff --git a/starters/dubbo-spring-boot-starter/src/main/resources/META-INF/spring-configuration-metadata.json b/starters/dubbo-spring-boot-starter/src/main/resources/META-INF/spring-configuration-metadata.json index 4a9a4fc..42a91d4 100644 --- a/starters/dubbo-spring-boot-starter/src/main/resources/META-INF/spring-configuration-metadata.json +++ b/starters/dubbo-spring-boot-starter/src/main/resources/META-INF/spring-configuration-metadata.json @@ -71,6 +71,12 @@ "sourceType": "com.schbrain.framework.autoconfigure.dubbo.properties.DubboProperties", "sourceMethod": "getScan()" }, + { + "name": "dubbo.ssl", + "type": "org.apache.dubbo.config.SslConfig", + "sourceType": "com.schbrain.framework.autoconfigure.dubbo.properties.DubboProperties", + "sourceMethod": "getSsl()" + }, { "name": "dubbo.tracing", "type": "org.apache.dubbo.config.TracingConfig", @@ -2005,6 +2011,121 @@ "description": "The basePackages to scan , the multiple-value is delimited by comma @see EnableDubbo#scanBasePackages()", "sourceType": "com.schbrain.framework.autoconfigure.dubbo.properties.DubboProperties$Scan" }, + { + "name": "dubbo.ssl.ca-address", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.ca-cert-path", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.client-key-cert-chain-path", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.client-key-cert-chain-path-stream", + "type": "java.io.InputStream", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.client-key-password", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.client-private-key-path", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.client-private-key-path-stream", + "type": "java.io.InputStream", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.client-trust-cert-collection-path", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.client-trust-cert-collection-path-stream", + "type": "java.io.InputStream", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.default", + "type": "java.lang.Boolean", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.env-type", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.id", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.meta-data", + "type": "java.util.Map", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.oidc-token-path", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.prefixes", + "type": "java.util.List", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.scope-model", + "type": "org.apache.dubbo.rpc.model.ScopeModel", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.server-key-cert-chain-path", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.server-key-cert-chain-path-stream", + "type": "java.io.InputStream", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.server-key-password", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.server-private-key-path", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.server-private-key-path-stream", + "type": "java.io.InputStream", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.server-trust-cert-collection-path", + "type": "java.lang.String", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, + { + "name": "dubbo.ssl.server-trust-cert-collection-path-stream", + "type": "java.io.InputStream", + "sourceType": "org.apache.dubbo.config.SslConfig" + }, { "name": "dubbo.tracing.baggage", "type": "org.apache.dubbo.config.nested.BaggageConfig", diff --git a/support/schbrain-spring-support/src/main/java/com/schbrain/framework/support/spring/defaults/DefaultPropertiesEnvironmentPostProcessor.java b/support/schbrain-spring-support/src/main/java/com/schbrain/framework/support/spring/defaults/DefaultPropertiesEnvironmentPostProcessor.java index 25b9182..6d9b3d4 100644 --- a/support/schbrain-spring-support/src/main/java/com/schbrain/framework/support/spring/defaults/DefaultPropertiesEnvironmentPostProcessor.java +++ b/support/schbrain-spring-support/src/main/java/com/schbrain/framework/support/spring/defaults/DefaultPropertiesEnvironmentPostProcessor.java @@ -94,8 +94,8 @@ public class DefaultPropertiesEnvironmentPostProcessor extends LoggerAwareEnviro return; } if (!environment.containsProperty(DUBBO_REGISTER_KEY)) { - log.info(StrFormatter.format("Not running on CloudPlatform, {} is set to false by default", DUBBO_REGISTER_KEY)); - log.info(StrFormatter.format("If you want force to register with Dubbo Registry, set {} = true", DUBBO_REGISTER_KEY)); + log.warn(StrFormatter.format("Not running on CloudPlatform, {} is set to false by default", DUBBO_REGISTER_KEY)); + log.warn(StrFormatter.format("If you want force to register with Dubbo Registry, set {} = true", DUBBO_REGISTER_KEY)); defaultProperties.put(DUBBO_REGISTER_KEY, false); } } -- GitLab