Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.8

Operating System version: WINDOWS 10 20H1

Java version: Java 1.8

Steps to reproduce this issue

配置文件中指定apollo配置中心的相关值。

dubbo:
config-center:
address: apollo://t.ppssxx.com:8080
# 配置中心的配置覆盖本地配置
highest-priority: true
namespace: TEST1.dubbo
config-file: TEST1.dubbo.properties
group: TEST1.dubbo
app-config-file: TEST1.dubbo.properties

启动应用，拉取配置

应用启动失败

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

应该正确获取到配置文件中指定的Namespace值,在本场景中为TEST1.dubbo

Actual Result

未能正确获取，而是变成了默认的dubbo

What actually happens?

If there is an exception, please attach the exception trace:

2020-08-16 23:34:37.645 ERROR 3752 --- [ main] o.s.boot.SpringApplication : Application run failed

java.lang.IllegalStateException: Failed to connect to config center, the config center is Apollo, the address is: http://xxx:8080
at org.apache.dubbo.configcenter.support.apollo.ApolloDynamicConfiguration.<init>(ApolloDynamicConfiguration.java:109) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.configcenter.support.apollo.ApolloDynamicConfigurationFactory.createDynamicConfiguration(ApolloDynamicConfigurationFactory.java:29) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.common.config.configcenter.AbstractDynamicConfigurationFactory.lambda$getDynamicConfiguration$0(AbstractDynamicConfigurationFactory.java:39) ~[dubbo-2.7.8.jar:2.7.8]
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) ~[na:na]
at org.apache.dubbo.common.config.configcenter.AbstractDynamicConfigurationFactory.getDynamicConfiguration(AbstractDynamicConfigurationFactory.java:39) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.common.config.configcenter.DynamicConfiguration.getDynamicConfiguration(DynamicConfiguration.java:224) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.prepareEnvironment(DubboBootstrap.java:1034) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.startConfigCenter(DubboBootstrap.java:623) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.initialize(DubboBootstrap.java:521) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:896) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:59) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:52) ~[dubbo-2.7.8.jar:2.7.8]
at org.apache.dubbo.config.spring.context.OneTimeExecutionApplicationContextEventListener.onApplicationEvent(OneTimeExecutionApplicationContextEventListener.java:40) ~[dubbo-2.7.8.jar:2.7.8]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:742) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:389) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:311) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202) ~[spring-boot-2.1.6.RELEASE.jar:2.1.6.RELEASE]
at com.sf.dubbo.bootstrap.providerApplication.main(providerApplication.java:28) ~[classes/:na]

查看源码和调式发现：

dubbo/dubbo-configcenter/dubbo-configcenter-apollo/src/main/java/org/apache/dubbo/configcenter/support/apollo/ApolloDynamicConfiguration.java

Lines 99 to 102
in
0be2a1b

String namespace = url.getParameter(CONFIG_NAMESPACE_KEY, DEFAULT_GROUP);

String apolloNamespace = StringUtils.isEmpty(namespace) ? url.getParameter(GROUP_KEY, DEFAULT_GROUP) : namespace;

dubboConfig = ConfigService.getConfig(apolloNamespace);

dubboConfigFile = ConfigService.getConfigFile(apolloNamespace, ConfigFileFormat.Properties);

这里截取的ParameterKey 不对，这里获取的是config.namespace，而在url内部的Parameter实际为namesapce，导致获取为空，由于给了默认值下面的语句判空也没有发挥任何作用，appConfigFile的值也未能正确获取到。

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.2-SNAPSHOT

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

private String[] getCategories(URL url) {
return ANY_VALUE.equals(url.getServiceInterface()) ?
ALL_SUPPORTED_CATEGORIES : of(DEFAULT_CATEGORY);
}

i think it shoudl be :

private String[] getCategories(URL url) {
return ANY_VALUE.equals(url.getServiceInterface()) ?
ALL_SUPPORTED_CATEGORIES : of(url.getParameter(CATEGORY_KEY,DEFAULT_CATEGORY));
}

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!