remove spring default qos-enable (#12861)

fix #12779
This commit is contained in:
xixingya 2023-08-16 21:01:28 +08:00 committed by GitHub
parent b87746b19f
commit 7290ae59bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View File

@ -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<String, Object> 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<String, Object> 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

View File

@ -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");