From 7290ae59bc69577b5b902dc0f6e161eb4c74db6b Mon Sep 17 00:00:00 2001 From: xixingya <2679431923@qq.com> Date: Wed, 16 Aug 2023 21:01:28 +0800 Subject: [PATCH] remove spring default qos-enable (#12861) fix #12779 --- .../DubboDefaultPropertiesEnvironmentPostProcessor.java | 7 +------ ...DubboDefaultPropertiesEnvironmentPostProcessorTest.java | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java index 44a0ae59de..adeb94b1f6 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java +++ b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java @@ -33,7 +33,6 @@ import java.util.Map; import java.util.Properties; import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_APPLICATION_NAME_PROPERTY; -import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_APPLICATION_QOS_ENABLE_PROPERTY; import static org.apache.dubbo.spring.boot.util.DubboUtils.DUBBO_CONFIG_MULTIPLE_PROPERTY; import static org.apache.dubbo.spring.boot.util.DubboUtils.SPRING_APPLICATION_NAME_PROPERTY; @@ -73,8 +72,6 @@ public class DubboDefaultPropertiesEnvironmentPostProcessor implements Environme Map defaultProperties = new HashMap<>(); setDubboApplicationNameProperty(environment, defaultProperties); setDubboConfigMultipleProperty(defaultProperties); - setDubboApplicationQosEnableProperty(defaultProperties); - //setAllowBeanDefinitionOverriding(defaultProperties); return defaultProperties; } @@ -90,9 +87,7 @@ public class DubboDefaultPropertiesEnvironmentPostProcessor implements Environme defaultProperties.put(DUBBO_CONFIG_MULTIPLE_PROPERTY, Boolean.TRUE.toString()); } - private void setDubboApplicationQosEnableProperty(Map defaultProperties) { - defaultProperties.put(DUBBO_APPLICATION_QOS_ENABLE_PROPERTY, Boolean.TRUE.toString()); - } + /** * Set {@link #ALLOW_BEAN_DEFINITION_OVERRIDING_PROPERTY "spring.main.allow-bean-definition-overriding"} to be diff --git a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java index bde4c383a7..56642875d2 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java +++ b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/test/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessorTest.java @@ -53,7 +53,7 @@ public class DubboDefaultPropertiesEnvironmentPostProcessorTest { PropertySource defaultPropertySource = propertySources.get("defaultProperties"); Assert.assertNotNull(defaultPropertySource); Assert.assertEquals("true", defaultPropertySource.getProperty("dubbo.config.multiple")); - Assert.assertEquals("true", defaultPropertySource.getProperty("dubbo.application.qos-enable")); + // Assert.assertEquals("true", defaultPropertySource.getProperty("dubbo.application.qos-enable")); // Case 2 : Only set property "spring.application.name" environment.setProperty("spring.application.name", "demo-dubbo-application");