You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2018/10/30 10:16:06 UTC

[incubator-dubbo] branch dev-metadata updated (ac13330 -> e6e6689)

This is an automated email from the ASF dual-hosted git repository.

liujun pushed a change to branch dev-metadata
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git.


    from ac13330  Rename MetadataReportFactory SPI config files
     new 4c51b0d  fix comments
     new e125951  Add dynamic configuration support
     add 00a3df8  remove a redundant '>' (#2467)
     add f27c5a7  typo in junit: simle -> simple (#2465)
     add 9611c2c  Fix typo.
     add 685fb2c  Add share by twitter button.
     add 7a86d61  Add more mailing list info.
     add 7e5f080  remove travis cache (#2481)
     add 038e87e  format code style (#2475)
     add 51f0677  [Dubbo-2424] Fix switch-case fall through in ChannelEventRunnable (#2426)
     add e18810b  [Dubbo-2446]Fix ClassNotFoundException when load Service Interface by parent ClassLoader (#2447)
     add c9eb57f  Update dubbo-issue-report-template.md (#2483)
     add 8c2f34e  Upgrade maven dependency to the latest version
     add e1e6978  Update readme (#2488)
     add ffed96f  Update Readme (#2494)
     add 96eec3d  fix stable problem for unit cases (#2497)
     add 8254e3d  [Dubbo-2499]fix PojoUtil realize type convert not support subclasses of 'java.util.date' #2499 (#2500)
     add 737f7a7  add jdk11 to travis ci (#2487)
     add 18e839d  per xsd, web fragment's name should be a valid java identifier. (#2506)
     add 917756e  Enhance NOTICE file.
     add bcc3e74  code promote: move constant field to Constants class (#2509)
     add fbf4be9  change unit port (#2513)
     add cfd474d  fix some xsd error (#2470)
     add 10f08f2  Condition  applicationContext != null is always true (#2505)
     add 6dc2308   typo: leastIndexs->leastIndexes (#2520)
     add bbe176f  Fix typos in serialization unit tests (#2523)
     add 7d3a6ab   #2507: Dubbo 's ExtensionLoader may be can't find custom Extension (#2518)
     add 7ad0b84  Merge pull request #2325, AsyncRpcResult should store the copy of the RpcContext.
     add 9135546  Merge pull request #2434, Remove method.async of provider url.
     add cd60e58  [Dubbo-2348 ] AbstractRegistry util test enhancement (#2409)
     add b411a77  set timeout to 3000 (#2536)
     add 18dee4e  code format (#2528)
     add 4776efb  Optimization unnecessary unboxing 'b.booleanValue()' and Remove invalid  throws java.lang.Exception (#2529)
     add e6b0bc8   Support for caching null values (#2480)
     add 84410f7   issue#2516: Remove getSpringContext() from org.apache.dubbo.config.spring.ServiceBean (#2517)
     add 0d20194  fix #2532, change different port (#2551)
     add 4fd352b  fix #2533, set timeout to 3000 (#2552)
     add 755bbf9  rm java 9 and 10 on travis (#2559)
     add 00b718c  code format (#2554)
     add cd7ba29  fix #2557 Update ConfigUtils.java (#2562)
     add 733a376  fix #2560, use target/test-classes as the basedir (#2563)
     add 6edfb1d  Optimize leastActiveSelect and weight test case (#2172)
     add 040343b  fix #2545 delayed address (such as zookeeper) parsing (#2565)
     add be51a11  fix registry unit test failed (#2577)
     add 9b7284f  AbstractRegistryFactory Unit Test: destroyAll method (#2581)
     add 3c34ee8  update lastest version to 2.6.4 (#2601)
     add 046bc30  fix #2600 add javadoc-plugin to dubbo-all module (#2604)
     add d8ed9fe  Remove unuse class. (#2608)
     add 8abd590  Fixed a minor issue with doConnect not using getConnectTimeout() in NettyClient (#2595)
     add 5a25e7d  Fix incorrect descriptions for dubbo-serialization module. (#2620)
     add ccce69e  Issue2583 (#2614)
     add d738318  fix #1641, support get system load on windows (#2631)
     add adb5b0e  Optimize RoundRobinLoadBalance (#2586)
     add 45b3ab4  Merge pull request #2636, move the classes of model from config to rpc-api for reusing.
     add 8cafcab  combine test coverage report (#2643)
     add 1ef1220  Optimize ut for serialization model. (#2632)
     add 393ffce  prototype for issue2570 (#2640)
     add d8282fe  [Dubbo -fix annotation bug] Fix @Reference bug (#2649)
     add b723837  Merge pull request #2656, make sure serialization exception sends back to consumer to preventing endless waiting.
     add c805c1d      #1903: supplemental change (#2666)
     add 5e60bef  Optimize the doSelect method of RandomLoadBalance to reduce the times of invoke of the getWeight method of the AbstractLoadBalance (#2597)
     add dd950ac  解决与quartz集成报错问题 (#2677)
     add 6938d48  Code format (#2662)
     add f2b6f07  Merge pull request#2679, consumer throws RpcException when RegistryDirectory notify in high QPS.
     add 7286e23  remove ServiceClassHolder and use the ApplicationModel replacedly (#2646)
     add ac013b1  [Dubbo-1983] Support Protobuf Serialization (#2618)
     add 910b261  Smooth Round Robin selection (#2650)
     add b8bc80b  enhance pull request 2618 (#2691)
     add 46f95bf  fix typo error in FAQ (#2684)
     add a777aec  remove author info for RoundRobinLoadBalance (#2697)
     add dba175a  fix pom for protostuff serialization (#2700)
     add 99a00ba  Optimize REGISTRIES field in AbstractRegistryFactory. (#2703)
     add 36a1155  [version 2.7.0]remove the StaticContext class and refactor the code related to Async (#2688)
     new 9af1f1a  Merge branch 'master' into dev-metadata-config-mergemaster
     new 596721d  Fix compiler error after merge master branch
     new 79812af  Enhancements for dynamic config
     new 93b1cf0  Move UT in config-api to bootstrap temporarily, to solve the unreasonable dependency problem between modules. For long term run, we should refactor the config-api module to stop it from depending on other modules.
     new e6e6689  Changes on demo, for test purpose.

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../ISSUE_TEMPLATE/dubbo-issue-report-template.md  |    4 +-
 .travis.yml                                        |    5 +-
 FAQ.md                                             |    6 +-
 NOTICE                                             |   11 +-
 README.md                                          |   21 +-
 dubbo-all/pom.xml                                  |   49 +-
 dubbo-bom/pom.xml                                  |    5 +
 dubbo-bootstrap/pom.xml                            |   64 ++
 .../org/apache/dubbo/bootstrap/DubboBootstrap.java |    1 -
 .../apache/dubbo/bootstrap}/DubboShutdownHook.java |    2 +-
 .../org/apache/dubbo/rpc/cluster/RouterChain.java  |    2 +-
 .../rpc/cluster/directory/AbstractDirectory.java   |    3 +-
 .../cluster/loadbalance/AbstractLoadBalance.java   |    6 +-
 .../loadbalance/LeastActiveLoadBalance.java        |   31 +-
 .../rpc/cluster/loadbalance/RandomLoadBalance.java |    8 +-
 .../cluster/loadbalance/RoundRobinLoadBalance.java |  164 ++-
 .../cluster/router/condition/ConditionRouter.java  |    9 +-
 .../condition/config/ConfigConditionRouter.java    |    4 +-
 .../cluster/router/mock/MockInvokersSelector.java  |    4 +-
 .../dubbo/rpc/cluster/router/tag/TagRouter.java    |    2 +-
 .../cluster/support/AbstractClusterInvoker.java    |   12 +-
 .../dubbo/rpc/cluster/support/ClusterUtils.java    |   14 +-
 .../org/apache/dubbo/rpc/cluster/StickyTest.java   |    4 +-
 .../loadbalance/LeastActiveBalanceTest.java        |   28 +-
 .../cluster/loadbalance/LoadBalanceBaseTest.java   |  131 ++-
 .../cluster/loadbalance/RandomLoadBalanceTest.java |   32 +-
 .../loadbalance/RoundRobinLoadBalanceTest.java     |  133 ++-
 .../support/AbstractClusterInvokerTest.java        |   18 +-
 .../java/org/apache/dubbo/common/Constants.java    |    4 +
 .../src/main/java/org/apache/dubbo/common/URL.java |  124 +-
 .../common/beanutil/JavaBeanSerializeUtil.java     |   18 +-
 .../dubbo/common/bytecode/ClassGenerator.java      |  722 ++++++------
 .../org/apache/dubbo/common/bytecode/Mixin.java    |   41 +-
 .../org/apache/dubbo/common/bytecode/Proxy.java    |   62 +-
 .../org/apache/dubbo/common/bytecode/Wrapper.java  |   90 +-
 .../dubbo/common/compiler/support/JdkCompiler.java |    6 +-
 .../dubbo/common/config/AbstractConfiguration.java |   91 ++
 .../common/config/AbstractPrefixConfiguration.java |   49 +
 .../common/config/CompositeConfiguration.java      |   86 ++
 .../apache/dubbo/common/config/Configuration.java  |   73 ++
 .../common/config/EnvironmentConfiguration.java    |   22 +-
 .../dubbo/common/config/InmemoryConfiguration.java |  105 +-
 .../common/config/PropertiesConfiguration.java     |   33 +-
 .../dubbo/common/config/SystemConfiguration.java   |   22 +-
 .../dubbo/common/extension/ExtensionLoader.java    |   81 +-
 .../java/org/apache/dubbo/common/io/Bytes.java     |  123 +-
 .../org/apache/dubbo/common/io/StreamUtils.java    |   29 +-
 .../common/io/UnsafeByteArrayInputStream.java      |   21 +-
 .../common/io/UnsafeByteArrayOutputStream.java     |   15 +-
 .../apache/dubbo/common/io/UnsafeStringReader.java |   21 +-
 .../apache/dubbo/common/io/UnsafeStringWriter.java |   14 +-
 .../dubbo/common/json/GenericJSONConverter.java    |  108 +-
 .../org/apache/dubbo/common/json/J2oVisitor.java   |   77 +-
 .../java/org/apache/dubbo/common/json/JSON.java    |   28 +-
 .../org/apache/dubbo/common/json/JSONArray.java    |    8 +-
 .../org/apache/dubbo/common/json/JSONObject.java   |   11 +-
 .../org/apache/dubbo/common/json/JSONReader.java   |    6 +-
 .../org/apache/dubbo/common/json/JSONWriter.java   |   15 +-
 .../java/org/apache/dubbo/common/json/Yylex.java   |   30 +-
 .../dubbo/common/logger/jdk/JdkLoggerAdapter.java  |   36 +-
 .../common/logger/log4j/Log4jLoggerAdapter.java    |   36 +-
 .../common/status/support/LoadStatusChecker.java   |    5 +
 .../common/store/support/SimpleDataStore.java      |    4 +-
 .../dubbo/common/utils/AtomicPositiveInteger.java  |    8 +-
 .../org/apache/dubbo/common/utils/ClassHelper.java |   16 +-
 .../apache/dubbo/common/utils/CollectionUtils.java |    4 +-
 .../dubbo/common/utils/CompatibleTypeUtils.java    |   13 +-
 .../org/apache/dubbo/common/utils/ConfigUtils.java |    5 +-
 .../org/apache/dubbo/common/utils/IOUtils.java     |   15 +-
 .../java/org/apache/dubbo/common/utils/Log.java    |   44 +-
 .../org/apache/dubbo/common/utils/LogUtil.java     |   23 +-
 .../org/apache/dubbo/common/utils/NetUtils.java    |    9 +-
 .../org/apache/dubbo/common/utils/PojoUtils.java   |    6 +-
 .../apache/dubbo/common/utils/ReflectUtils.java    |  258 +++--
 .../java/org/apache/dubbo/common/utils/Stack.java  |   20 +-
 .../org/apache/dubbo/common/utils/StringUtils.java |   75 +-
 .../org/apache/dubbo/common/utils/UrlUtils.java    |   12 +-
 .../common/compiler/support/JavaCodeTest.java      |    6 +-
 .../compiler/support/JavassistCompilerTest.java    |    4 +-
 .../common/compiler/support/JdkCompilerTest.java   |    4 +-
 .../org/apache/dubbo/common/model/AnimalEnum.java  |   21 -
 .../apache/dubbo/common/model/BizException.java    |   29 -
 .../model/BizExceptionNoDefaultConstructor.java    |   26 -
 .../common/utils/CompatibleTypeUtilsTest.java      |    9 +
 .../apache/dubbo/common/utils/PojoUtilsTest.java   |   30 +
 .../apache/dubbo/common/utils/UrlUtilsTest.java    |   18 +-
 .../main/java/com/alibaba/dubbo/common/URL.java    |   12 +-
 .../org/apache/dubbo/config/MethodConfigTest.java  |   27 +-
 .../apache/dubbo/generic/GenericServiceTest.java   |    2 +-
 dubbo-config/dubbo-config-api/pom.xml              |   68 --
 .../org/apache/dubbo/config/AbstractConfig.java    |  293 +++--
 .../dubbo/config/AbstractInterfaceConfig.java      |  101 +-
 .../org/apache/dubbo/config/ApplicationConfig.java |    5 +
 .../apache/dubbo/config/ConfigCenterConfig.java    |  221 ++++
 .../java/org/apache/dubbo/config/MethodConfig.java |   31 +
 .../org/apache/dubbo/config/MonitorConfig.java     |    5 +
 .../org/apache/dubbo/config/ProtocolConfig.java    |    9 -
 .../org/apache/dubbo/config/ReferenceConfig.java   |  157 ++-
 .../org/apache/dubbo/config/RegistryConfig.java    |   10 +-
 .../org/apache/dubbo/config/ServiceConfig.java     |  108 +-
 .../apache/dubbo/config/ServiceStoreConfig.java    |    7 +-
 .../apache/dubbo/config/context/Environment.java   |  136 +++
 .../dubbo/config/model/ApplicationModel.java       |   94 --
 .../dubbo/config/model/ConsumerMethodModel.java    |   86 --
 .../dubbo/config/utils/ConfigConverter.java}       |   22 +-
 .../dubbo/config/utils/ReferenceConfigCache.java   |    4 +-
 .../apache/dubbo/config/AbstractConfigTest.java    |  517 ---------
 .../dubbo/config/AbstractInterfaceConfigTest.java  |  411 -------
 .../dubbo/config/AbstractMethodConfigTest.java     |  119 --
 .../dubbo/config/AbstractReferenceConfigTest.java  |  157 ---
 .../dubbo/config/AbstractServiceConfigTest.java    |  181 ---
 .../apache/dubbo/config/ApplicationConfigTest.java |  177 ---
 .../apache/dubbo/config/ArgumentConfigTest.java    |   63 -
 .../apache/dubbo/config/ConsumerConfigTest.java    |   81 --
 .../apache/dubbo/config/GenericServiceTest.java    |  315 -----
 .../org/apache/dubbo/config/MethodConfigTest.java  |  182 ---
 .../org/apache/dubbo/config/ModuleConfigTest.java  |  110 --
 .../org/apache/dubbo/config/MonitorConfigTest.java |  107 --
 .../apache/dubbo/config/ProtocolConfigTest.java    |  217 ----
 .../apache/dubbo/config/ProviderConfigTest.java    |  219 ----
 .../apache/dubbo/config/ReferenceConfigTest.java   |  108 --
 .../apache/dubbo/config/RegistryConfigTest.java    |  178 ---
 .../org/apache/dubbo/config/ServiceConfigTest.java |  205 ----
 .../test/java/org/apache/dubbo/config/api/Box.java |   23 -
 .../org/apache/dubbo/config/api/DemoException.java |   42 -
 .../org/apache/dubbo/config/api/DemoService.java   |   37 -
 .../java/org/apache/dubbo/config/api/Greeting.java |   24 -
 .../java/org/apache/dubbo/config/api/User.java     |   65 --
 .../apache/dubbo/config/cache/CacheService.java    |   26 -
 .../dubbo/config/cache/CacheServiceImpl.java       |   32 -
 .../org/apache/dubbo/config/cache/CacheTest.java   |  119 --
 .../config/consumer/DemoActionByAnnotation.java    |   35 -
 .../dubbo/config/consumer/DemoActionBySetter.java  |   36 -
 .../dubbo/config/consumer/DemoInterceptor.java     |   31 -
 .../DelegateProviderMetaDataInvokerTest.java       |   59 -
 .../apache/dubbo/config/mock/GreetingLocal1.java   |   21 -
 .../apache/dubbo/config/mock/GreetingLocal2.java   |   26 -
 .../apache/dubbo/config/mock/GreetingLocal3.java   |   32 -
 .../apache/dubbo/config/mock/GreetingMock1.java    |   20 -
 .../apache/dubbo/config/mock/GreetingMock2.java    |   29 -
 .../org/apache/dubbo/config/mock/MockCluster.java  |   29 -
 .../org/apache/dubbo/config/mock/MockCodec.java    |   37 -
 .../apache/dubbo/config/mock/MockDispatcher.java   |   29 -
 .../apache/dubbo/config/mock/MockExchanger.java    |   37 -
 .../dubbo/config/mock/MockExporterListener.java    |   34 -
 .../org/apache/dubbo/config/mock/MockFilter.java   |   30 -
 .../dubbo/config/mock/MockInvokerListener.java     |   33 -
 .../apache/dubbo/config/mock/MockLoadBalance.java  |   32 -
 .../org/apache/dubbo/config/mock/MockProtocol.java |   86 --
 .../apache/dubbo/config/mock/MockProtocol2.java    |   48 -
 .../apache/dubbo/config/mock/MockProxyFactory.java |   39 -
 .../org/apache/dubbo/config/mock/MockRegistry.java |  108 --
 .../dubbo/config/mock/MockRegistryFactory.java     |   37 -
 .../dubbo/config/mock/MockRegistryFactory2.java    |   31 -
 .../dubbo/config/mock/MockStatusChecker.java       |   28 -
 .../dubbo/config/mock/MockTelnetHandler.java       |   29 -
 .../apache/dubbo/config/mock/MockThreadPool.java   |   30 -
 .../apache/dubbo/config/mock/MockTransporter.java  |   41 -
 .../apache/dubbo/config/mock/TestProxyFactory.java |   33 -
 .../config/provider/impl/DemoServiceImpl.java      |   51 -
 .../config/url/ExporterSideConfigUrlTest.java      |   99 --
 .../dubbo/config/url/InvokerSideConfigUrlTest.java |  228 ----
 .../dubbo/config/url/RpcConfigGetSetProxy.java     |  166 ---
 .../org/apache/dubbo/config/url/UrlTestBase.java   |  211 ----
 .../dubbo/config/utils/MockReferenceConfig.java    |   53 -
 .../config/utils/ReferenceConfigCacheTest.java     |  114 --
 .../config/validation/ValidationParameter.java     |  106 --
 .../dubbo/config/validation/ValidationService.java |   70 --
 .../config/validation/ValidationServiceImpl.java   |   37 -
 .../dubbo/config/validation/ValidationTest.java    |  302 -----
 .../org.apache.dubbo.common.status.StatusChecker   |   18 -
 .../org.apache.dubbo.common.threadpool.ThreadPool  |   18 -
 .../org.apache.dubbo.registry.RegistryFactory      |    2 -
 .../services/org.apache.dubbo.remoting.Codec       |   18 -
 .../services/org.apache.dubbo.remoting.Dispatcher  |   18 -
 .../services/org.apache.dubbo.remoting.Transporter |   18 -
 .../org.apache.dubbo.remoting.exchange.Exchanger   |   18 -
 .../org.apache.dubbo.remoting.telnet.TelnetHandler |   18 -
 .../services/org.apache.dubbo.rpc.ExporterListener |   18 -
 .../META-INF/services/org.apache.dubbo.rpc.Filter  |    1 -
 .../services/org.apache.dubbo.rpc.InvokerListener  |    1 -
 .../services/org.apache.dubbo.rpc.Protocol         |    2 -
 .../services/org.apache.dubbo.rpc.ProxyFactory     |    2 -
 .../services/org.apache.dubbo.rpc.cluster.Cluster  |    1 -
 .../org.apache.dubbo.rpc.cluster.LoadBalance       |    1 -
 .../apache/dubbo/config/spring/ReferenceBean.java  |   23 +-
 .../apache/dubbo/config/spring/ServiceBean.java    |   38 +-
 .../DubboConfigBindingBeanPostProcessor.java       |    2 +-
 .../ReferenceAnnotationBeanPostProcessor.java      |  107 +-
 .../spring/extension/SpringExtensionFactory.java   |    4 +
 .../spring/initializer/DubboContextListener.java   |   72 ++
 .../spring/schema/DubboNamespaceHandler.java       |    2 +
 .../spring/status/DataSourceStatusChecker.java     |   12 +-
 .../config/spring/status/SpringStatusChecker.java  |   12 +-
 .../src/main/resources/META-INF/compat/dubbo.xsd   |   74 +-
 .../src/main/resources/META-INF/dubbo.xsd          |   72 +-
 .../src/main/resources/META-INF/web-fragment.xml   |    6 +-
 .../org/apache/dubbo/config/spring/ConfigTest.java |    6 +-
 .../ReferenceAnnotationBeanPostProcessorTest.java  |   84 +-
 .../DubboApplicationContextInitializerTest.java    |   15 +-
 .../initializer/DubboApplicationListenerTest.java  |    2 +-
 .../spring/status/DataSourceStatusCheckerTest.java |   11 +-
 .../spring/status/SpringStatusCheckerTest.java     |   13 +-
 .../dubbo/config/spring/annotation-consumer.xml    |    2 +-
 .../dubbo/config/spring/delay-fixed-time.xml       |    2 +-
 .../dubbo/config/spring/delay-on-initialized.xml   |    2 +-
 .../config/spring/override-multi-protocol.xml      |    5 +-
 .../apache/dubbo/config/spring/provider-multi.xml  |    3 +-
 dubbo-demo/dubbo-demo-consumer/pom.xml             |    4 +
 .../META-INF/spring/dubbo-demo-consumer.xml        |    6 +-
 .../META-INF/spring/dubbo-demo-provider.xml        |    5 +-
 dubbo-dependencies-bom/pom.xml                     |   15 +-
 dubbo-distribution/pom.xml                         |    7 +-
 .../org/apache/dubbo/cache/filter/CacheFilter.java |   26 +-
 .../apache/dubbo/cache/filter/CacheFilterTest.java |    4 +-
 .../validation/support/jvalidation/JValidator.java |   23 +-
 .../governance/AbstractDynamicConfiguration.java   |   15 +-
 .../dubbo/governance/DynamicConfiguration.java     |    7 +-
 .../governance/DynamicConfigurationFactory.java    |    2 +
 .../support/nop/NopDynamicConfiguration.java       |    8 +-
 .../nop/NopDynamicConfigurationFactory.java        |   13 +-
 .../support/apollo/ApolloDynamicConfiguration.java |   23 +
 .../apollo/ApolloDynamicConfigurationFactory.java  |    7 +
 .../archaius/ArchaiusDynamicConfiguration.java     |    8 +-
 .../ArchaiusDynamicConfigurationFactory.java       |    5 +
 .../java/org/apache/dubbo/metrics/MetricName.java  |   66 +-
 .../org/apache/dubbo/monitor/dubbo/Statistics.java |   51 +-
 dubbo-plugin/dubbo-qos/pom.xml                     |    2 +-
 .../apache/dubbo/qos/command/CommandContext.java   |    3 +-
 .../java/org/apache/dubbo/qos/command/impl/Ls.java |    6 +-
 .../org/apache/dubbo/qos/command/impl/Offline.java |    8 +-
 .../org/apache/dubbo/qos/command/impl/Online.java  |    8 +-
 .../org/apache/dubbo/qos/command/impl/LsTest.java  |    6 +-
 .../apache/dubbo/qos/command/impl/OfflineTest.java |    4 +-
 .../apache/dubbo/qos/command/impl/OnlineTest.java  |    4 +-
 dubbo-registry/dubbo-registry-api/pom.xml          |    5 +
 .../registry/integration/RegistryDirectory.java    |   10 +-
 .../registry/integration/RegistryProtocol.java     |   48 +-
 .../dubbo/registry/support/AbstractRegistry.java   |    4 +-
 .../registry/support/AbstractRegistryFactory.java  |    6 +-
 .../support/AbstractRegistryFactoryTest.java       |   17 +-
 .../registry/support/AbstractRegistryTest.java     |   64 +-
 .../src/test/resources/AppAnyServices.yml          |    2 +-
 .../src/test/resources/AppMultiServices.yml        |    2 +-
 .../src/test/resources/AppNoService.yml            |    2 +-
 .../apache/dubbo/registry/dubbo/DubboRegistry.java |    3 +-
 .../apache/dubbo/registry/redis/RedisRegistry.java |   24 +-
 .../registry/zookeeper/ZookeeperRegistry.java      |    4 +-
 .../apache/dubbo/remoting/exchange/Request.java    |    4 +-
 .../remoting/exchange/codec/ExchangeCodec.java     |   40 +-
 .../support/header/HeaderExchangeChannel.java      |   20 +-
 .../support/header/HeaderExchangeHandler.java      |   10 +-
 .../support/header/HeaderExchangeServer.java       |    3 +-
 .../dubbo/remoting/transport/AbstractClient.java   |   23 +-
 .../dubbo/remoting/transport/CodecSupport.java     |    6 +
 .../transport/dispatcher/ChannelEventRunnable.java |    1 +
 .../dubbo/remoting/codec/ExchangeCodecTest.java    |   18 +
 .../transport/codec/DeprecatedExchangeCodec.java   |   18 +-
 .../remoting/transport/grizzly/GrizzlyChannel.java |   20 +-
 .../remoting/transport/grizzly/GrizzlyClient.java  |    5 +-
 .../dubbo/remoting/transport/mina/MinaChannel.java |   20 +-
 .../dubbo/remoting/transport/mina/MinaClient.java  |    9 +-
 .../remoting/transport/mina/MinaCodecAdapter.java  |    4 +-
 .../transport/mina/MinaClientToServerTest.java     |    2 +-
 .../remoting/transport/netty/NettyChannel.java     |   20 +-
 .../remoting/transport/netty/NettyClient.java      |    5 +-
 .../transport/netty/ClientReconnectTest.java       |    2 +-
 .../transport/netty/NettyClientToServerTest.java   |    2 +-
 .../remoting/transport/netty4/NettyChannel.java    |   20 +-
 .../remoting/transport/netty4/NettyClient.java     |    9 +-
 .../transport/netty4/NettyClientToServerTest.java  |    2 +-
 .../java/org/apache/dubbo/rpc/AsyncRpcResult.java  |    5 +-
 .../main/java/org/apache/dubbo/rpc/RpcContext.java |   25 +
 .../org/apache/dubbo/rpc/ServiceClassHolder.java   |   45 -
 .../java/org/apache/dubbo/rpc/StaticContext.java   |   75 --
 .../org/apache/dubbo/rpc/filter/EchoFilter.java    |    3 +-
 .../apache/dubbo/rpc/model/ApplicationModel.java   |   75 ++
 .../dubbo/rpc/model/ConsumerMethodModel.java       |  160 +++
 .../org/apache/dubbo/rpc}/model/ConsumerModel.java |   38 +-
 .../dubbo/rpc}/model/ProviderMethodModel.java      |    2 +-
 .../org/apache/dubbo/rpc}/model/ProviderModel.java |   19 +-
 .../dubbo/rpc/protocol/AbstractExporter.java       |    9 +-
 .../apache/dubbo/rpc/protocol/AbstractInvoker.java |   12 +-
 .../apache/dubbo/rpc/support/DelegateInvoker.java  |   61 -
 .../org/apache/dubbo/rpc/support/RpcUtils.java     |    8 +-
 .../org/apache/dubbo/rpc/StaticContextTest.java    |   64 --
 .../rpc/protocol/dubbo/DecodeableRpcResult.java    |    6 +-
 .../dubbo/rpc/protocol/dubbo/DubboCodec.java       |   41 +-
 .../dubbo/rpc/protocol/dubbo/DubboInvoker.java     |    3 +-
 .../dubbo/rpc/protocol/dubbo/DubboProtocol.java    |    6 +-
 .../protocol/dubbo/LazyConnectExchangeClient.java  |   17 +-
 .../rpc/protocol/dubbo/filter/FutureFilter.java    |   48 +-
 .../rpc/protocol/dubbo/DubboProtocolTest.java      |   24 +-
 .../rpc/protocol/dubbo/ExplicitCallbackTest.java   |    5 +-
 .../rpc/protocol/dubbo/ImplicitCallBackTest.java   |   75 +-
 .../dubbo/telnet/ChangeTelnetHandlerTest.java      |    2 +-
 .../dubbo/telnet/InvokerTelnetHandlerTest.java     |   12 +-
 .../dubbo/telnet/ListTelnetHandlerTest.java        |    8 +-
 .../dubbo/telnet/PortTelnetHandlerTest.java        |   12 +-
 .../dubbo/rpc/protocol/redis/RedisProtocol.java    |   24 +-
 .../dubbo/rpc/protocol/rest/RestProtocol.java      |    6 +-
 .../dubbo/rpc/protocol/rest/RestProtocolTest.java  |   50 +-
 .../dubbo/rpc/protol/rest/RestProtocolTest.java    |   23 +-
 .../dubbo/rpc/protocol/thrift/ThriftProtocol.java  |    3 +-
 .../io/RandomAccessByteArrayOutputStream.java      |   15 +-
 .../webservice/WebserviceProtocolTest.java         |    4 +-
 .../dubbo-serialization-api/pom.xml                |    2 +-
 .../dubbo-serialization-fastjson/pom.xml           |    2 +-
 .../serialize/fastjson/FastJsonObjectInput.java    |    5 +-
 .../common/serialize/fastjson/model/Image.java     |  104 --
 .../common/serialize/fastjson/model/Person.java    |   38 -
 .../src/test/resources/log4j.xml                   |   32 -
 .../dubbo-serialization-fst/pom.xml                |    2 +-
 .../common/serialize/fst/model/AnimalEnum.java     |   21 -
 .../common/serialize/fst/model/FullAddress.java    |  199 ----
 .../src/test/resources/log4j.xml                   |   32 -
 .../dubbo-serialization-hessian2/pom.xml           |    2 +-
 .../org/apache/dubbo/common/model/AnimalEnum.java  |   21 -
 .../apache/dubbo/common/model/BizException.java    |   29 -
 .../model/BizExceptionNoDefaultConstructor.java    |   26 -
 .../org/apache/dubbo/common/model/media/Image.java |  120 --
 .../org/apache/dubbo/common/model/media/Media.java |  205 ----
 .../dubbo/common/model/media/MediaContent.java     |   78 --
 .../dubbo/common/model/person/BigPerson.java       |  151 ---
 .../dubbo/common/model/person/PersonInfo.java      |  206 ----
 .../apache/dubbo/common/model/person/Phone.java    |  139 ---
 .../AbstractSerializationPersionOkTest.java        |   93 --
 .../serialization/AbstractSerializationTest.java   | 1210 -------------------
 .../src/test/resources/log4j.xml                   |   32 -
 .../dubbo/common/serialize/dubbo/SimpleDO.fc       |    2 -
 .../dubbo-serialization-jdk/pom.xml                |    2 +-
 .../serialize/java/CompactedObjectInputStream.java |    3 +-
 .../common/serialize/java/JavaObjectInput.java     |   15 +-
 .../org/apache/dubbo/common/model/AnimalEnum.java  |   21 -
 .../apache/dubbo/common/model/BizException.java    |   29 -
 .../java/org/apache/dubbo/common/model/Person.java |   95 --
 .../dubbo/common/model/SerializablePerson.java     |   97 --
 .../dubbo/common/model/media/MediaContent.java     |   78 --
 .../dubbo/common/model/person/FullAddress.java     |  202 ----
 .../dubbo/common/model/person/PersonInfo.java      |  206 ----
 .../dubbo/common/model/person/PersonStatus.java    |   22 -
 .../AbstractSerializationPersionFailTest.java      |  137 ---
 .../AbstractSerializationPersionOkTest.java        |   93 --
 .../src/test/resources/log4j.xml                   |   32 -
 .../dubbo/common/serialize/dubbo/SimpleDO.fc       |    2 -
 .../dubbo-serialization-kryo/pom.xml               |    2 +-
 .../model/BizExceptionNoDefaultConstructor.java    |   26 -
 .../java/org/apache/dubbo/common/model/Person.java |   95 --
 .../dubbo/common/model/SerializablePerson.java     |   97 --
 .../org/apache/dubbo/common/model/media/Image.java |  120 --
 .../org/apache/dubbo/common/model/media/Media.java |  205 ----
 .../dubbo/common/model/media/MediaContent.java     |   78 --
 .../dubbo/common/model/person/BigPerson.java       |  151 ---
 .../dubbo/common/model/person/FullAddress.java     |  202 ----
 .../dubbo/common/model/person/PersonStatus.java    |   22 -
 .../apache/dubbo/common/model/person/Phone.java    |  139 ---
 .../AbstractSerializationPersionFailTest.java      |  137 ---
 .../serialization/AbstractSerializationTest.java   | 1215 --------------------
 .../src/test/resources/log4j.xml                   |   32 -
 .../pom.xml                                        |   28 +-
 .../protostuff/ProtostuffObjectInput.java          |  134 +++
 .../protostuff/ProtostuffObjectOutput.java         |  128 +++
 .../protostuff/ProtostuffSerialization.java}       |   15 +-
 .../dubbo/common/serialize/protostuff/Wrapper.java |   21 +-
 .../protostuff/delegate/TimeDelegate.java          |   54 +
 .../serialize/protostuff/utils/WrapperUtils.java   |   92 ++
 ...org.apache.dubbo.common.serialize.Serialization |    1 +
 .../dubbo-serialization-test}/pom.xml              |   40 +-
 .../base/AbstractSerializationPersonFailTest.java} |   25 +-
 .../base/AbstractSerializationPersonOkTest.java}   |   41 +-
 .../serialize/base}/AbstractSerializationTest.java |   50 +-
 .../fastjson/FastJsonObjectInputTest.java          |    2 +-
 .../fastjson/FastJsonObjectOutputTest.java         |    6 +-
 .../fastjson/FastJsonSerializationTest.java        |    3 -
 .../dubbo/common/serialize/fst/FstFactoryTest.java |    0
 .../common/serialize/fst/FstObjectInputTest.java   |    5 +-
 .../common/serialize/fst/FstObjectOutputTest.java  |    6 +-
 .../common/serialize/fst/FstSerializationTest.java |    0
 .../serialize/hessian2/Hessian2PersonOkTest.java}  |   17 +-
 .../hessian2}/Hessian2SerializationTest.java       |    7 +-
 .../jdk}/CompactedJavaSerializationTest.java       |    5 +-
 .../serialize/jdk}/JavaSerializationTest.java      |    5 +-
 .../common/serialize/jdk/JdkPersonOkTest.java}     |   12 +-
 .../jdk}/NativeJavaSerializationTest.java          |    5 +-
 .../common/serialize/kryo/KryoPersonOkTest.java}   |   11 +-
 .../serialize/kryo}/KyroSerializationTest.java     |    4 +-
 .../serialize/kryo}/ReflectionUtilsTest.java       |    3 +-
 .../dubbo/common/serialize}/model/AnimalEnum.java  |    2 +-
 .../common/serialize}/model/BizException.java      |    2 +-
 .../model/BizExceptionNoDefaultConstructor.java    |    2 +-
 .../dubbo/common/serialize}/model/Person.java      |    2 +-
 .../serialize}/model/SerializablePerson.java       |    2 +-
 .../dubbo/common/serialize}/model/media/Image.java |    2 +-
 .../dubbo/common/serialize}/model/media/Media.java |    2 +-
 .../serialize}/model/media/MediaContent.java       |    2 +-
 .../common/serialize}/model/person/BigPerson.java  |    2 +-
 .../serialize}/model/person/FullAddress.java       |    2 +-
 .../common/serialize}/model/person/PersonInfo.java |    2 +-
 .../serialize}/model/person/PersonStatus.java      |    2 +-
 .../common/serialize}/model/person/Phone.java      |    2 +-
 .../protostuff/ProtostuffSerializationTest.java    |   21 +-
 .../support/SerializableClassRegistryTest.java     |   13 +-
 .../src/test/resources/log4j.xml                   |   56 +-
 .../SimpleDO.fc                                    |    0
 dubbo-serialization/pom.xml                        |    4 +-
 pom.xml                                            |    8 +-
 406 files changed, 5614 insertions(+), 15292 deletions(-)
 rename {dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config => dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap}/DubboShutdownHook.java (98%)
 create mode 100644 dubbo-common/src/main/java/org/apache/dubbo/common/config/AbstractConfiguration.java
 create mode 100644 dubbo-common/src/main/java/org/apache/dubbo/common/config/AbstractPrefixConfiguration.java
 create mode 100644 dubbo-common/src/main/java/org/apache/dubbo/common/config/CompositeConfiguration.java
 create mode 100644 dubbo-common/src/main/java/org/apache/dubbo/common/config/Configuration.java
 copy dubbo-demo/dubbo-demo-consumer/src/main/java/org/apache/dubbo/demo/consumer/DemoServiceMock.java => dubbo-common/src/main/java/org/apache/dubbo/common/config/EnvironmentConfiguration.java (70%)
 copy dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/lru/LruCache.java => dubbo-common/src/main/java/org/apache/dubbo/common/config/InmemoryConfiguration.java (55%)
 rename dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/DelegateExporter.java => dubbo-common/src/main/java/org/apache/dubbo/common/config/PropertiesConfiguration.java (57%)
 copy dubbo-demo/dubbo-demo-consumer/src/main/java/org/apache/dubbo/demo/consumer/DemoServiceMock.java => dubbo-common/src/main/java/org/apache/dubbo/common/config/SystemConfiguration.java (70%)
 delete mode 100644 dubbo-common/src/test/java/org/apache/dubbo/common/model/AnimalEnum.java
 delete mode 100644 dubbo-common/src/test/java/org/apache/dubbo/common/model/BizException.java
 delete mode 100644 dubbo-common/src/test/java/org/apache/dubbo/common/model/BizExceptionNoDefaultConstructor.java
 create mode 100644 dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java
 create mode 100644 dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/context/Environment.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/model/ApplicationModel.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/model/ConsumerMethodModel.java
 copy dubbo-config/{dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/ObjectUtils.java => dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigConverter.java} (58%)
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractInterfaceConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractMethodConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractReferenceConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractServiceConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ArgumentConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ConsumerConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/GenericServiceTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/MethodConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ModuleConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/MonitorConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ProtocolConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ProviderConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/RegistryConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ServiceConfigTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/Box.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/DemoException.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/DemoService.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/Greeting.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/User.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/cache/CacheService.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/cache/CacheServiceImpl.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/cache/CacheTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/consumer/DemoActionByAnnotation.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/consumer/DemoActionBySetter.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/consumer/DemoInterceptor.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/invoker/DelegateProviderMetaDataInvokerTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingLocal1.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingLocal2.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingLocal3.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingMock1.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingMock2.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockCluster.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockCodec.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockDispatcher.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockExchanger.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockExporterListener.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockFilter.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockInvokerListener.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockLoadBalance.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockProtocol.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockProtocol2.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockProxyFactory.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockRegistry.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockRegistryFactory.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockRegistryFactory2.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockStatusChecker.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockTelnetHandler.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockThreadPool.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockTransporter.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/TestProxyFactory.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/provider/impl/DemoServiceImpl.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/ExporterSideConfigUrlTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/InvokerSideConfigUrlTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/RpcConfigGetSetProxy.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/UrlTestBase.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/utils/MockReferenceConfig.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/utils/ReferenceConfigCacheTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationParameter.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationService.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationServiceImpl.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationTest.java
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.common.status.StatusChecker
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.common.threadpool.ThreadPool
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.registry.RegistryFactory
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.Codec
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.Dispatcher
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.Transporter
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.exchange.Exchanger
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.telnet.TelnetHandler
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.ExporterListener
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.Filter
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.InvokerListener
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.Protocol
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.ProxyFactory
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.cluster.Cluster
 delete mode 100644 dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.cluster.LoadBalance
 create mode 100644 dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/initializer/DubboContextListener.java
 delete mode 100644 dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/ServiceClassHolder.java
 delete mode 100644 dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/StaticContext.java
 create mode 100644 dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/model/ApplicationModel.java
 create mode 100644 dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/model/ConsumerMethodModel.java
 rename {dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config => dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc}/model/ConsumerModel.java (71%)
 rename {dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config => dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc}/model/ProviderMethodModel.java (98%)
 rename {dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config => dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc}/model/ProviderModel.java (86%)
 delete mode 100644 dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/DelegateInvoker.java
 delete mode 100644 dubbo-rpc/dubbo-rpc-api/src/test/java/org/apache/dubbo/rpc/StaticContextTest.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-fastjson/src/test/java/org/apache/dubbo/common/serialize/fastjson/model/Image.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-fastjson/src/test/java/org/apache/dubbo/common/serialize/fastjson/model/Person.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-fastjson/src/test/resources/log4j.xml
 delete mode 100644 dubbo-serialization/dubbo-serialization-fst/src/test/java/org/apache/dubbo/common/serialize/fst/model/AnimalEnum.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-fst/src/test/java/org/apache/dubbo/common/serialize/fst/model/FullAddress.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-fst/src/test/resources/log4j.xml
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/model/AnimalEnum.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/model/BizException.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/model/BizExceptionNoDefaultConstructor.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/model/media/Image.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/model/media/Media.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/model/media/MediaContent.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/model/person/BigPerson.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/model/person/PersonInfo.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/model/person/Phone.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/serialize/serialization/AbstractSerializationPersionOkTest.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/serialize/serialization/AbstractSerializationTest.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/resources/log4j.xml
 delete mode 100644 dubbo-serialization/dubbo-serialization-hessian2/src/test/resources/org/apache/dubbo/common/serialize/dubbo/SimpleDO.fc
 delete mode 100644 dubbo-serialization/dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/model/AnimalEnum.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/model/BizException.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/model/Person.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/model/SerializablePerson.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/model/media/MediaContent.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/model/person/FullAddress.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/model/person/PersonInfo.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/model/person/PersonStatus.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/serialize/serialization/AbstractSerializationPersionFailTest.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/serialize/serialization/AbstractSerializationPersionOkTest.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-jdk/src/test/resources/log4j.xml
 delete mode 100644 dubbo-serialization/dubbo-serialization-jdk/src/test/resources/org/apache/dubbo/common/serialize/dubbo/SimpleDO.fc
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/model/BizExceptionNoDefaultConstructor.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/model/Person.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/model/SerializablePerson.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/model/media/Image.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/model/media/Media.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/model/media/MediaContent.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/model/person/BigPerson.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/model/person/FullAddress.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/model/person/PersonStatus.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/model/person/Phone.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/serialize/serialization/AbstractSerializationPersionFailTest.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/serialize/serialization/AbstractSerializationTest.java
 delete mode 100644 dubbo-serialization/dubbo-serialization-kryo/src/test/resources/log4j.xml
 copy dubbo-serialization/{dubbo-serialization-kryo => dubbo-serialization-protostuff}/pom.xml (65%)
 create mode 100644 dubbo-serialization/dubbo-serialization-protostuff/src/main/java/org/apache/dubbo/common/serialize/protostuff/ProtostuffObjectInput.java
 create mode 100644 dubbo-serialization/dubbo-serialization-protostuff/src/main/java/org/apache/dubbo/common/serialize/protostuff/ProtostuffObjectOutput.java
 copy dubbo-serialization/{dubbo-serialization-fastjson/src/main/java/org/apache/dubbo/common/serialize/fastjson/FastJsonSerialization.java => dubbo-serialization-protostuff/src/main/java/org/apache/dubbo/common/serialize/protostuff/ProtostuffSerialization.java} (83%)
 copy dubbo-common/src/main/java/org/apache/dubbo/common/utils/Holder.java => dubbo-serialization/dubbo-serialization-protostuff/src/main/java/org/apache/dubbo/common/serialize/protostuff/Wrapper.java (73%)
 create mode 100644 dubbo-serialization/dubbo-serialization-protostuff/src/main/java/org/apache/dubbo/common/serialize/protostuff/delegate/TimeDelegate.java
 create mode 100644 dubbo-serialization/dubbo-serialization-protostuff/src/main/java/org/apache/dubbo/common/serialize/protostuff/utils/WrapperUtils.java
 create mode 100644 dubbo-serialization/dubbo-serialization-protostuff/src/main/resources/META-INF/dubbo/internal/org.apache.dubbo.common.serialize.Serialization
 copy {dubbo-rpc/dubbo-rpc-thrift => dubbo-serialization/dubbo-serialization-test}/pom.xml (67%)
 rename dubbo-serialization/{dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/serialize/serialization/AbstractSerializationPersionFailTest.java => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/base/AbstractSerializationPersonFailTest.java} (77%)
 rename dubbo-serialization/{dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/serialize/serialization/AbstractSerializationPersionOkTest.java => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/base/AbstractSerializationPersonOkTest.java} (62%)
 rename dubbo-serialization/{dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/serialize/serialization => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/base}/AbstractSerializationTest.java (96%)
 rename dubbo-serialization/{dubbo-serialization-fastjson => dubbo-serialization-test}/src/test/java/org/apache/dubbo/common/serialize/fastjson/FastJsonObjectInputTest.java (98%)
 rename dubbo-serialization/{dubbo-serialization-fastjson => dubbo-serialization-test}/src/test/java/org/apache/dubbo/common/serialize/fastjson/FastJsonObjectOutputTest.java (95%)
 rename dubbo-serialization/{dubbo-serialization-fastjson => dubbo-serialization-test}/src/test/java/org/apache/dubbo/common/serialize/fastjson/FastJsonSerializationTest.java (91%)
 rename dubbo-serialization/{dubbo-serialization-fst => dubbo-serialization-test}/src/test/java/org/apache/dubbo/common/serialize/fst/FstFactoryTest.java (100%)
 rename dubbo-serialization/{dubbo-serialization-fst => dubbo-serialization-test}/src/test/java/org/apache/dubbo/common/serialize/fst/FstObjectInputTest.java (90%)
 rename dubbo-serialization/{dubbo-serialization-fst => dubbo-serialization-test}/src/test/java/org/apache/dubbo/common/serialize/fst/FstObjectOutputTest.java (97%)
 rename dubbo-serialization/{dubbo-serialization-fst => dubbo-serialization-test}/src/test/java/org/apache/dubbo/common/serialize/fst/FstSerializationTest.java (100%)
 copy dubbo-serialization/{dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/serialize/serialization/Hessian2SerializationTest.java => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/hessian2/Hessian2PersonOkTest.java} (96%)
 rename dubbo-serialization/{dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common/serialize/serialization => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/hessian2}/Hessian2SerializationTest.java (97%)
 rename dubbo-serialization/{dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/serialize/serialization => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/jdk}/CompactedJavaSerializationTest.java (86%)
 copy dubbo-serialization/{dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/serialize/serialization => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/jdk}/JavaSerializationTest.java (87%)
 rename dubbo-serialization/{dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/serialize/serialization/JavaSerializationTest.java => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/jdk/JdkPersonOkTest.java} (80%)
 rename dubbo-serialization/{dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common/serialize/serialization => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/jdk}/NativeJavaSerializationTest.java (86%)
 copy dubbo-serialization/{dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/serialize/serialization/KyroSerializationTest.java => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/kryo/KryoPersonOkTest.java} (78%)
 rename dubbo-serialization/{dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/serialize/serialization => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/kryo}/KyroSerializationTest.java (88%)
 rename dubbo-serialization/{dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common/serialize/serialization => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/kryo}/ReflectionUtilsTest.java (96%)
 rename dubbo-serialization/{dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/AnimalEnum.java (94%)
 rename dubbo-serialization/{dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/BizException.java (95%)
 rename dubbo-serialization/{dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/BizExceptionNoDefaultConstructor.java (95%)
 rename dubbo-serialization/{dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/Person.java (98%)
 rename dubbo-serialization/{dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/SerializablePerson.java (98%)
 rename dubbo-serialization/{dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/media/Image.java (98%)
 rename dubbo-serialization/{dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/media/Media.java (99%)
 rename {dubbo-common/src/test/java/org/apache/dubbo/common => dubbo-serialization/dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/media/MediaContent.java (97%)
 rename dubbo-serialization/{dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/person/BigPerson.java (98%)
 rename dubbo-serialization/{dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/person/FullAddress.java (99%)
 rename dubbo-serialization/{dubbo-serialization-kryo/src/test/java/org/apache/dubbo/common => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/person/PersonInfo.java (99%)
 rename dubbo-serialization/{dubbo-serialization-hessian2/src/test/java/org/apache/dubbo/common => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/person/PersonStatus.java (93%)
 rename dubbo-serialization/{dubbo-serialization-jdk/src/test/java/org/apache/dubbo/common => dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize}/model/person/Phone.java (98%)
 rename dubbo-rpc/dubbo-rpc-api/src/test/java/org/apache/dubbo/rpc/ServiceHolderTest.java => dubbo-serialization/dubbo-serialization-test/src/test/java/org/apache/dubbo/common/serialize/protostuff/ProtostuffSerializationTest.java (67%)
 rename dubbo-serialization/{dubbo-serialization-api => dubbo-serialization-test}/src/test/java/org/apache/dubbo/common/serialize/support/SerializableClassRegistryTest.java (80%)
 rename {dubbo-config/dubbo-config-api => dubbo-serialization/dubbo-serialization-test}/src/test/resources/log4j.xml (77%)
 rename dubbo-serialization/{dubbo-serialization-kryo/src/test/resources/org/apache/dubbo/common/serialize/dubbo => dubbo-serialization-test/src/test/resources/org.apache.dubbo.common.serialize.dubbo}/SimpleDO.fc (100%)


[incubator-dubbo] 05/07: Enhancements for dynamic config

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch dev-metadata
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git

commit 79812afd8bacad7c0a9075b7d008740f49b56685
Author: ken.lj <ke...@gmail.com>
AuthorDate: Tue Oct 30 18:10:58 2018 +0800

    Enhancements for dynamic config
---
 .../org/apache/dubbo/rpc/cluster/RouterChain.java  |  2 +-
 dubbo-config/dubbo-config-api/pom.xml              | 63 ----------------------
 .../apache/dubbo/config/ConfigCenterConfig.java    |  2 +
 .../org/apache/dubbo/config/ReferenceConfig.java   |  3 +-
 .../org/apache/dubbo/config/ServiceConfig.java     |  3 +-
 .../apache/dubbo/config/context/Environment.java   | 15 +++---
 .../initializer/DubboApplicationListenerTest.java  |  2 +-
 .../nop/NopDynamicConfigurationFactory.java        |  2 +
 dubbo-registry/dubbo-registry-api/pom.xml          |  5 ++
 .../registry/integration/RegistryProtocol.java     | 15 +-----
 10 files changed, 25 insertions(+), 87 deletions(-)

diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/RouterChain.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/RouterChain.java
index e788754..aaac226 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/RouterChain.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/RouterChain.java
@@ -118,7 +118,7 @@ public class RouterChain<T> {
      * @param invocation     TODO has not been used yet
      */
     public void preRoute(Map<String, List<Invoker<T>>> methodInvokers, URL url, Invocation invocation) {
-        if (CollectionUtils.isEmpty(routers)) {
+        if (CollectionUtils.isEmpty(routers) || methodInvokers == null) {
             treeCache.refreshTree(null);
             return;
         }
diff --git a/dubbo-config/dubbo-config-api/pom.xml b/dubbo-config/dubbo-config-api/pom.xml
index 71bf8bc..285ab54 100644
--- a/dubbo-config/dubbo-config-api/pom.xml
+++ b/dubbo-config/dubbo-config-api/pom.xml
@@ -59,68 +59,5 @@
             <artifactId>dubbo-filter-cache</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-registry-default</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-monitor-default</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-rpc-dubbo</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-rpc-rmi</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-remoting-netty4</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.validation</groupId>
-            <artifactId>validation-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-validator</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.glassfish</groupId>
-            <artifactId>javax.el</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-registry-multicast</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-serialization-hessian2</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-serialization-jdk</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 </project>
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java
index 9c4dc63..b532dd6 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java
@@ -84,7 +84,9 @@ public class ConfigCenterConfig extends AbstractConfig {
 
         URL url = toConfigUrl();
         DynamicConfiguration dynamicConfiguration = ExtensionLoader.getExtensionLoader(DynamicConfigurationFactory.class).getAdaptiveExtension().getDynamicConfiguration(url);
+        Environment.getInstance().setDynamicConfiguration(dynamicConfiguration);
         String configContent = dynamicConfiguration.getConfig(dataid, namespace);
+
         try {
             if (configContent == null) {
                 logger.warn("You specified the config centre, but there's not even one single config item in it.");
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
index 5587340..a1ba384 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
@@ -548,8 +548,9 @@ public class ReferenceConfig<T> extends AbstractReferenceConfig {
     }
 
     @Override
+    @Parameter(excluded = true)
     public String getPrefix() {
-        return Constants.DUBBO + ".reference" + interfaceName;
+        return Constants.DUBBO + ".reference." + interfaceName;
     }
 
 }
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
index 82cf3b3..bebd352 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
@@ -870,7 +870,8 @@ public class ServiceConfig<T> extends AbstractServiceConfig {
     }
 
     @Override
+    @Parameter(excluded = true)
     public String getPrefix() {
-        return Constants.DUBBO + ".service" + interfaceName;
+        return Constants.DUBBO + ".service." + interfaceName;
     }
 }
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/context/Environment.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/context/Environment.java
index 9e4cdbb..edd8134 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/context/Environment.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/context/Environment.java
@@ -24,13 +24,11 @@ import org.apache.dubbo.common.config.InmemoryConfiguration;
 import org.apache.dubbo.common.config.PropertiesConfiguration;
 import org.apache.dubbo.common.config.SystemConfiguration;
 import org.apache.dubbo.common.extension.ExtensionLoader;
-import org.apache.dubbo.common.utils.CollectionUtils;
 import org.apache.dubbo.common.utils.StringUtils;
 import org.apache.dubbo.governance.DynamicConfiguration;
 import org.apache.dubbo.governance.DynamicConfigurationFactory;
 
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
 /**
@@ -47,6 +45,8 @@ public class Environment {
 
     private volatile InmemoryConfiguration externalConfiguration = new InmemoryConfiguration();
 
+    private volatile DynamicConfiguration dynamicConfiguration;
+
     private volatile boolean isConfigCenterFirst;
 
     public static Environment getInstance() {
@@ -97,13 +97,14 @@ public class Environment {
      * @return
      */
     public DynamicConfiguration getDynamicConfiguration() {
-        ExtensionLoader<DynamicConfigurationFactory> factoryLoader = ExtensionLoader.getExtensionLoader(DynamicConfigurationFactory.class);
-        Set<Object> factories = factoryLoader.getLoadedExtensionInstances();
-        if (CollectionUtils.isEmpty(factories)) {
-            return factoryLoader.getDefaultExtension().getDynamicConfiguration(null);
+        if (dynamicConfiguration != null) {
+            return dynamicConfiguration;
         }
+        return ExtensionLoader.getExtensionLoader(DynamicConfigurationFactory.class).getDefaultExtension().getDynamicConfiguration(null);
+    }
 
-        return ((DynamicConfigurationFactory) factories.iterator().next()).getExistedDynamicConfiguration();
+    public void setDynamicConfiguration(DynamicConfiguration dynamicConfiguration) {
+        this.dynamicConfiguration = dynamicConfiguration;
     }
 
     private static String toKey(String keypart1, String keypart2) {
diff --git a/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/initializer/DubboApplicationListenerTest.java b/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/initializer/DubboApplicationListenerTest.java
index 9b953d5..34cb4db 100644
--- a/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/initializer/DubboApplicationListenerTest.java
+++ b/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/initializer/DubboApplicationListenerTest.java
@@ -16,8 +16,8 @@
  */
 package org.apache.dubbo.config.spring.initializer;
 
-import org.apache.dubbo.config.DubboShutdownHook;
 import org.apache.dubbo.bootstrap.DubboBootstrap;
+import org.apache.dubbo.bootstrap.DubboShutdownHook;
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
diff --git a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfigurationFactory.java b/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfigurationFactory.java
index d423555..13f91a1 100644
--- a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfigurationFactory.java
+++ b/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfigurationFactory.java
@@ -24,12 +24,14 @@ import org.apache.dubbo.governance.DynamicConfigurationFactory;
  *
  */
 public class NopDynamicConfigurationFactory implements DynamicConfigurationFactory {
+    private static final URL FAkED_URL = URL.valueOf("config://0.0.0.0:20000/fakepath");
 
     private NopDynamicConfiguration dynamicConfiguration;
 
     @Override
     public DynamicConfiguration getDynamicConfiguration(URL url) {
         dynamicConfiguration = new NopDynamicConfiguration();
+        dynamicConfiguration.setUrl(FAkED_URL);
         return dynamicConfiguration;
     }
 
diff --git a/dubbo-registry/dubbo-registry-api/pom.xml b/dubbo-registry/dubbo-registry-api/pom.xml
index e403d03..fd57a9a 100644
--- a/dubbo-registry/dubbo-registry-api/pom.xml
+++ b/dubbo-registry/dubbo-registry-api/pom.xml
@@ -36,6 +36,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-config-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
             <artifactId>dubbo-governance-api</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
index b43031f..61fdc09 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
@@ -26,11 +26,11 @@ import org.apache.dubbo.common.utils.ConfigUtils;
 import org.apache.dubbo.common.utils.NamedThreadFactory;
 import org.apache.dubbo.common.utils.StringUtils;
 import org.apache.dubbo.common.utils.UrlUtils;
+import org.apache.dubbo.config.context.Environment;
 import org.apache.dubbo.governance.ConfigChangeEvent;
 import org.apache.dubbo.governance.ConfigChangeType;
 import org.apache.dubbo.governance.ConfigurationListener;
 import org.apache.dubbo.governance.DynamicConfiguration;
-import org.apache.dubbo.governance.DynamicConfigurationFactory;
 import org.apache.dubbo.registry.NotifyListener;
 import org.apache.dubbo.registry.Registry;
 import org.apache.dubbo.registry.RegistryFactory;
@@ -51,7 +51,6 @@ import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -89,7 +88,7 @@ public class RegistryProtocol implements Protocol {
 
     public RegistryProtocol() {
         INSTANCE = this;
-        dynamicConfiguration = getDynamicConfiguration();
+        dynamicConfiguration = Environment.getInstance().getDynamicConfiguration();
     }
 
     public static RegistryProtocol getRegistryProtocol() {
@@ -99,16 +98,6 @@ public class RegistryProtocol implements Protocol {
         return INSTANCE;
     }
 
-    public DynamicConfiguration getDynamicConfiguration() {
-        ExtensionLoader<DynamicConfigurationFactory> factoryLoader = ExtensionLoader.getExtensionLoader(DynamicConfigurationFactory.class);
-        Set<Object> factories = factoryLoader.getLoadedExtensionInstances();
-        if (CollectionUtils.isEmpty(factories)) {
-            return factoryLoader.getDefaultExtension().getDynamicConfiguration(null);
-        }
-
-        return ((DynamicConfigurationFactory) factories.iterator().next()).getExistedDynamicConfiguration();
-    }
-
     //Filter the parameters that do not need to be output in url(Starting with .)
     private static String[] getFilteredKeys(URL url) {
         Map<String, String> params = url.getParameters();


[incubator-dubbo] 04/07: Fix compiler error after merge master branch

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch dev-metadata
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git

commit 596721d08a318b069684b753a22e1f04070d7a63
Author: ken.lj <ke...@gmail.com>
AuthorDate: Tue Oct 30 14:39:35 2018 +0800

    Fix compiler error after merge master branch
---
 .../java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java  | 2 +-
 dubbo-plugin/dubbo-qos/pom.xml                                          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java
index e77ac49..20b0a0e 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java
@@ -55,7 +55,7 @@ public abstract class AbstractDirectory<T> implements Directory<T> {
     }
 
     public AbstractDirectory(URL url, URL consumerUrl, RouterChain<T> routerChain) {
-        if (url == null)
+        if (url == null) {
             throw new IllegalArgumentException("url == null");
         }
         this.url = url;
diff --git a/dubbo-plugin/dubbo-qos/pom.xml b/dubbo-plugin/dubbo-qos/pom.xml
index 8058fda..a5fd395 100644
--- a/dubbo-plugin/dubbo-qos/pom.xml
+++ b/dubbo-plugin/dubbo-qos/pom.xml
@@ -40,7 +40,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-config-api</artifactId>
+            <artifactId>dubbo-registry-api</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>


[incubator-dubbo] 01/07: fix comments

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch dev-metadata
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git

commit 4c51b0d885d732793e0ca80d166c59eb7c49be0d
Author: ken.lj <ke...@gmail.com>
AuthorDate: Wed Oct 24 14:32:15 2018 +0800

    fix comments
---
 dubbo-registry/dubbo-registry-api/src/test/resources/AppAnyServices.yml | 2 +-
 .../dubbo-registry-api/src/test/resources/AppMultiServices.yml          | 2 +-
 dubbo-registry/dubbo-registry-api/src/test/resources/AppNoService.yml   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dubbo-registry/dubbo-registry-api/src/test/resources/AppAnyServices.yml b/dubbo-registry/dubbo-registry-api/src/test/resources/AppAnyServices.yml
index 9301859..2d6da8b 100644
--- a/dubbo-registry/dubbo-registry-api/src/test/resources/AppAnyServices.yml
+++ b/dubbo-registry/dubbo-registry-api/src/test/resources/AppAnyServices.yml
@@ -1,4 +1,4 @@
-# Service scope, without  specific App
+# Application scope, apply to all services.
 ---
 scope: application
 key: app1
diff --git a/dubbo-registry/dubbo-registry-api/src/test/resources/AppMultiServices.yml b/dubbo-registry/dubbo-registry-api/src/test/resources/AppMultiServices.yml
index a2bf987..7ec8c94 100644
--- a/dubbo-registry/dubbo-registry-api/src/test/resources/AppMultiServices.yml
+++ b/dubbo-registry/dubbo-registry-api/src/test/resources/AppMultiServices.yml
@@ -1,4 +1,4 @@
-# Service scope, without  specific App
+# Application scope, apply to the specified services
 ---
 scope: application
 key: app1
diff --git a/dubbo-registry/dubbo-registry-api/src/test/resources/AppNoService.yml b/dubbo-registry/dubbo-registry-api/src/test/resources/AppNoService.yml
index 03d457b..3ad4eb2 100644
--- a/dubbo-registry/dubbo-registry-api/src/test/resources/AppNoService.yml
+++ b/dubbo-registry/dubbo-registry-api/src/test/resources/AppNoService.yml
@@ -1,4 +1,4 @@
-# Service scope, without specific App
+# Application scope, no service means apply to all
 ---
 scope: application
 key: app1


[incubator-dubbo] 02/07: Add dynamic configuration support

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch dev-metadata
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git

commit e1259519cbfcc07402bb634933cfaa1eecf09104
Author: ken.lj <ke...@gmail.com>
AuthorDate: Tue Oct 30 14:22:02 2018 +0800

    Add dynamic configuration support
---
 .../org/apache/dubbo/bootstrap/DubboBootstrap.java |   1 -
 .../apache/dubbo/bootstrap}/DubboShutdownHook.java |   2 +-
 .../condition/config/ConfigConditionRouter.java    |   4 +-
 .../dubbo/rpc/cluster/router/tag/TagRouter.java    |   2 +-
 .../java/org/apache/dubbo/common/Constants.java    |   2 +
 .../src/main/java/org/apache/dubbo/common/URL.java |   8 +
 .../dubbo/common/config/AbstractConfiguration.java |  91 ++++++++
 .../common/config/AbstractPrefixConfiguration.java |  49 +++++
 .../common/config/CompositeConfiguration.java      |  86 ++++++++
 .../apache/dubbo/common/config/Configuration.java  |  73 +++++++
 .../common/config/EnvironmentConfiguration.java    |  22 +-
 .../dubbo/common/config/InmemoryConfiguration.java |  38 ++--
 .../common/config/PropertiesConfiguration.java     |  32 ++-
 .../dubbo/common/config/SystemConfiguration.java   |  24 ++-
 .../dubbo/common/extension/ExtensionLoader.java    |   9 +
 dubbo-config/dubbo-config-api/pom.xml              |   5 -
 .../org/apache/dubbo/config/AbstractConfig.java    | 235 ++++++++++++++-------
 .../dubbo/config/AbstractInterfaceConfig.java      | 101 ++++-----
 .../org/apache/dubbo/config/ApplicationConfig.java |   5 +
 .../apache/dubbo/config/ConfigCenterConfig.java    | 219 +++++++++++++++++++
 .../java/org/apache/dubbo/config/MethodConfig.java |  31 +++
 .../org/apache/dubbo/config/MonitorConfig.java     |   5 +
 .../org/apache/dubbo/config/ProtocolConfig.java    |   9 -
 .../org/apache/dubbo/config/ReferenceConfig.java   |  83 +++++---
 .../org/apache/dubbo/config/RegistryConfig.java    |   7 +-
 .../org/apache/dubbo/config/ServiceConfig.java     |  99 +++++----
 .../apache/dubbo/config/ServiceStoreConfig.java    |   7 +-
 .../apache/dubbo/config/context/Environment.java   | 135 ++++++++++++
 .../apache/dubbo/config/utils/ConfigConverter.java |  28 +--
 .../apache/dubbo/config/AbstractConfigTest.java    |   8 +-
 .../apache/dubbo/config/spring/ReferenceBean.java  |   3 +
 .../apache/dubbo/config/spring/ServiceBean.java    |   3 +
 .../spring/schema/DubboNamespaceHandler.java       |   2 +
 .../src/main/resources/META-INF/compat/dubbo.xsd   |  70 ++++++
 .../src/main/resources/META-INF/dubbo.xsd          |  70 ++++++
 .../governance/AbstractDynamicConfiguration.java   |  15 +-
 .../dubbo/governance/DynamicConfiguration.java     |   7 +-
 .../governance/DynamicConfigurationFactory.java    |   2 +
 .../support/nop/NopDynamicConfiguration.java       |   8 +-
 .../nop/NopDynamicConfigurationFactory.java        |  11 +-
 .../support/apollo/ApolloDynamicConfiguration.java |  23 ++
 .../apollo/ApolloDynamicConfigurationFactory.java  |   7 +
 .../archaius/ArchaiusDynamicConfiguration.java     |   8 +-
 .../ArchaiusDynamicConfigurationFactory.java       |   5 +
 .../registry/integration/RegistryDirectory.java    |   4 +-
 .../registry/integration/RegistryProtocol.java     |  57 ++---
 46 files changed, 1376 insertions(+), 339 deletions(-)

diff --git a/dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/DubboBootstrap.java b/dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/DubboBootstrap.java
index b896c0e..8334c21 100644
--- a/dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/DubboBootstrap.java
+++ b/dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/DubboBootstrap.java
@@ -16,7 +16,6 @@
  */
 package org.apache.dubbo.bootstrap;
 
-import org.apache.dubbo.config.DubboShutdownHook;
 import org.apache.dubbo.config.ServiceConfig;
 
 import java.util.ArrayList;
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/DubboShutdownHook.java b/dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/DubboShutdownHook.java
similarity index 98%
rename from dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/DubboShutdownHook.java
rename to dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/DubboShutdownHook.java
index 90ed237..11a846b 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/DubboShutdownHook.java
+++ b/dubbo-bootstrap/src/main/java/org/apache/dubbo/bootstrap/DubboShutdownHook.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.config;
+package org.apache.dubbo.bootstrap;
 
 import org.apache.dubbo.common.extension.ExtensionLoader;
 import org.apache.dubbo.common.logger.Logger;
diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/config/ConfigConditionRouter.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/config/ConfigConditionRouter.java
index 90e59d9..6a4af0f 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/config/ConfigConditionRouter.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/config/ConfigConditionRouter.java
@@ -61,8 +61,8 @@ public class ConfigConditionRouter extends AbstractRouter implements Configurati
         String app = this.url.getParameter(Constants.APPLICATION_KEY);
         String serviceKey = this.url.getServiceKey();
         try {
-            String rawRule = this.configuration.getConfig(serviceKey + Constants.ROUTERS_SUFFIX, "dubbo", this);
-            String appRawRule = this.configuration.getConfig(app + Constants.ROUTERS_SUFFIX, "dubbo", this);
+            String rawRule = this.configuration.getConfig(serviceKey + Constants.ROUTERS_SUFFIX, this);
+            String appRawRule = this.configuration.getConfig(app + Constants.ROUTERS_SUFFIX, this);
             if (!StringUtils.isEmpty(rawRule)) {
                 try {
                     routerRule = ConditionRuleParser.parse(rawRule);
diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagRouter.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagRouter.java
index 6fe4890..55a4d22 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagRouter.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagRouter.java
@@ -77,7 +77,7 @@ public class TagRouter extends AbstractRouter implements Comparable<Router>, Con
             logger.error("TagRouter must getConfig from or subscribe to a specific application, but the application in this TagRouter is not specified.");
         }
         try {
-            String rawRule = this.configuration.getConfig(application + TAGROUTERRULES_DATAID, "dubbo", this);
+            String rawRule = this.configuration.getConfig(application + TAGROUTERRULES_DATAID, this);
             if (StringUtils.isNotEmpty(rawRule)) {
                 this.tagRouterRule = TagRuleParser.parse(rawRule);
             }
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/Constants.java b/dubbo-common/src/main/java/org/apache/dubbo/common/Constants.java
index 54ec952..93a8ae7 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/Constants.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/Constants.java
@@ -25,6 +25,8 @@ import java.util.regex.Pattern;
  */
 public class Constants {
 
+    public static final String DUBBO = "dubbo";
+
     public static final String PROVIDER = "provider";
 
     public static final String CONSUMER = "consumer";
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/URL.java b/dubbo-common/src/main/java/org/apache/dubbo/common/URL.java
index 5d24ed5..0bb6338 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/URL.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/URL.java
@@ -16,6 +16,8 @@
  */
 package org.apache.dubbo.common;
 
+import org.apache.dubbo.common.config.Configuration;
+import org.apache.dubbo.common.config.InmemoryConfiguration;
 import org.apache.dubbo.common.utils.CollectionUtils;
 import org.apache.dubbo.common.utils.NetUtils;
 import org.apache.dubbo.common.utils.StringUtils;
@@ -1384,6 +1386,12 @@ public /**final**/ class URL implements Serializable {
         return getMethodParameter(method, key, defaultValue);
     }
 
+    public Configuration toConfiguration() {
+        InmemoryConfiguration configuration = new InmemoryConfiguration();
+        configuration.addProperties(parameters);
+        return configuration;
+    }
+
     @Override
     public int hashCode() {
         final int prime = 31;
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/config/AbstractConfiguration.java b/dubbo-common/src/main/java/org/apache/dubbo/common/config/AbstractConfiguration.java
new file mode 100644
index 0000000..e660eb9
--- /dev/null
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/config/AbstractConfiguration.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.common.config;
+
+public abstract class AbstractConfiguration implements Configuration {
+
+    @Override
+    public String getString(String key) {
+        return convert(String.class, key, null);
+    }
+
+    @Override
+    public String getString(String key, String defaultValue) {
+        return convert(String.class, key, defaultValue);
+    }
+
+    @Override
+    public final Object getProperty(String key) {
+        return getProperty(key, null);
+    }
+
+    @Override
+    public Object getProperty(String key, Object defaultValue) {
+        Object value = getInternalProperty(key);
+        if (value == null) {
+            value = defaultValue;
+        }
+        return value;
+    }
+
+    @Override
+    public boolean containsKey(String key) {
+        return getProperty(key) != null;
+    }
+
+    protected abstract Object getInternalProperty(String key);
+
+    private <T> T convert(Class<T> cls, String key, T defaultValue) {
+        // we only process String properties for now
+        String value = (String) getProperty(key);
+
+        if (value == null) {
+            return defaultValue;
+        }
+
+        Object obj = value;
+        if (cls.isInstance(value)) {
+            return cls.cast(value);
+        }
+
+        if (String.class.equals(cls)) {
+            return cls.cast(value);
+        }
+
+        if (Boolean.class.equals(cls) || Boolean.TYPE.equals(cls)) {
+            obj = Boolean.valueOf(value);
+        } else if (Number.class.isAssignableFrom(cls) || cls.isPrimitive()) {
+            if (Integer.class.equals(cls) || Integer.TYPE.equals(cls)) {
+                obj = Integer.valueOf(value);
+            } else if (Long.class.equals(cls) || Long.TYPE.equals(cls)) {
+                obj = Long.valueOf(value);
+            } else if (Byte.class.equals(cls) || Byte.TYPE.equals(cls)) {
+                obj = Byte.valueOf(value);
+            } else if (Short.class.equals(cls) || Short.TYPE.equals(cls)) {
+                obj = Short.valueOf(value);
+            } else if (Float.class.equals(cls) || Float.TYPE.equals(cls)) {
+                obj = Float.valueOf(value);
+            } else if (Double.class.equals(cls) || Double.TYPE.equals(cls)) {
+                obj = Double.valueOf(value);
+            }
+        } else if (cls.isEnum()) {
+            obj = Enum.valueOf(cls.asSubclass(Enum.class), value);
+        }
+
+        return cls.cast(obj);
+    }
+}
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/config/AbstractPrefixConfiguration.java b/dubbo-common/src/main/java/org/apache/dubbo/common/config/AbstractPrefixConfiguration.java
new file mode 100644
index 0000000..eebff14
--- /dev/null
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/config/AbstractPrefixConfiguration.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.common.config;
+
+import org.apache.dubbo.common.utils.StringUtils;
+
+/**
+ * This is an abstraction specially customized for the sequence Dubbo retrieves properties.
+ */
+public abstract class AbstractPrefixConfiguration extends AbstractConfiguration {
+    protected String id;
+    protected String prefix;
+
+    public AbstractPrefixConfiguration(String prefix, String id) {
+        super();
+        this.prefix = prefix;
+        this.id = id;
+    }
+
+    @Override
+    public Object getProperty(String key, Object defaultValue) {
+
+        Object value = null;
+        if (StringUtils.isNotEmpty(prefix) && StringUtils.isNotEmpty(id)) {
+            value = getInternalProperty(prefix + id + "." + key);
+        }
+        if (value == null && StringUtils.isNotEmpty(prefix)) {
+            value = getInternalProperty(prefix + key);
+        }
+        if (value == null) {
+            value = super.getProperty(key, defaultValue);
+        }
+        return value;
+    }
+}
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/config/CompositeConfiguration.java b/dubbo-common/src/main/java/org/apache/dubbo/common/config/CompositeConfiguration.java
new file mode 100644
index 0000000..6d732da
--- /dev/null
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/config/CompositeConfiguration.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.common.config;
+
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ *
+ */
+public class CompositeConfiguration extends AbstractConfiguration {
+
+    /**
+     * List holding all the configuration
+     */
+    private List<Configuration> configList = new LinkedList<Configuration>();
+
+    public CompositeConfiguration() {
+
+    }
+
+    public CompositeConfiguration(Configuration... configurations) {
+        if (configurations != null && configurations.length > 0) {
+            Arrays.stream(configurations).filter(config -> !configList.contains(config)).forEach(configList::add);
+        }
+    }
+
+    public void addConfiguration(Configuration configuration) {
+        if (configList.contains(configuration)) {
+            return;
+        }
+        this.configList.add(configuration);
+    }
+
+    public void addConfigurationFirst(Configuration configuration) {
+        this.addConfiguration(0, configuration);
+    }
+
+    public void addConfiguration(int pos, Configuration configuration) {
+        this.configList.add(pos, configuration);
+    }
+
+    @Override
+    protected Object getInternalProperty(String key) {
+        Configuration firstMatchingConfiguration = null;
+        for (Configuration config : configList) {
+            try {
+                if (config.containsKey(key)) {
+                    firstMatchingConfiguration = config;
+                    break;
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        if (firstMatchingConfiguration != null) {
+            return firstMatchingConfiguration.getProperty(key);
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public boolean containsKey(String key) {
+        List<Configuration> subConfigList = configList.stream()
+                .filter(config -> config.containsKey(key))
+                .collect(Collectors.toList());
+        return subConfigList.size() > 0;
+    }
+}
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/config/Configuration.java b/dubbo-common/src/main/java/org/apache/dubbo/common/config/Configuration.java
new file mode 100644
index 0000000..2d76882
--- /dev/null
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/config/Configuration.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.common.config;
+
+/**
+ *
+ */
+public interface Configuration {
+    /**
+     * Get a string associated with the given configuration key.
+     *
+     * @param key The configuration key.
+     * @return The associated string.
+     */
+    String getString(String key);
+
+    /**
+     * Get a string associated with the given configuration key.
+     * If the key doesn't map to an existing object, the default value
+     * is returned.
+     *
+     * @param key          The configuration key.
+     * @param defaultValue The default value.
+     * @return The associated string if key is found and has valid
+     * format, default value otherwise.
+     */
+    String getString(String key, String defaultValue);
+
+    /**
+     * Gets a property from the configuration. This is the most basic get
+     * method for retrieving values of properties. In a typical implementation
+     * of the {@code Configuration} interface the other get methods (that
+     * return specific data types) will internally make use of this method. On
+     * this level variable substitution is not yet performed. The returned
+     * object is an internal representation of the property value for the passed
+     * in key. It is owned by the {@code Configuration} object. So a caller
+     * should not modify this object. It cannot be guaranteed that this object
+     * will stay constant over time (i.e. further update operations on the
+     * configuration may change its internal state).
+     *
+     * @param key property to retrieve
+     * @return the value to which this configuration maps the specified key, or
+     * null if the configuration contains no mapping for this key.
+     */
+    Object getProperty(String key);
+
+    Object getProperty(String key, Object defaultValue);
+
+    /**
+     * Check if the configuration contains the specified key.
+     *
+     * @param key the key whose presence in this configuration is to be tested
+     * @return {@code true} if the configuration contains a value for this
+     * key, {@code false} otherwise
+     */
+    boolean containsKey(String key);
+
+
+}
diff --git a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfigurationFactory.java b/dubbo-common/src/main/java/org/apache/dubbo/common/config/EnvironmentConfiguration.java
similarity index 67%
copy from dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfigurationFactory.java
copy to dubbo-common/src/main/java/org/apache/dubbo/common/config/EnvironmentConfiguration.java
index 62f2232..a38e831 100644
--- a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfigurationFactory.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/config/EnvironmentConfiguration.java
@@ -14,18 +14,24 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.governance.support.nop;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.governance.DynamicConfiguration;
-import org.apache.dubbo.governance.DynamicConfigurationFactory;
+package org.apache.dubbo.common.config;
 
 /**
  *
  */
-public class NopDynamicConfigurationFactory implements DynamicConfigurationFactory {
+public class EnvironmentConfiguration extends AbstractPrefixConfiguration {
+
+    public EnvironmentConfiguration(String prefix, String id) {
+        super(prefix, id);
+    }
+
+    public EnvironmentConfiguration() {
+        this(null, null);
+    }
+
     @Override
-    public DynamicConfiguration getDynamicConfiguration(URL url) {
-        return new NopDynamicConfiguration();
+    protected Object getInternalProperty(String key) {
+        return System.getenv(key);
     }
+
 }
diff --git a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfiguration.java b/dubbo-common/src/main/java/org/apache/dubbo/common/config/InmemoryConfiguration.java
similarity index 50%
copy from dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfiguration.java
copy to dubbo-common/src/main/java/org/apache/dubbo/common/config/InmemoryConfiguration.java
index e773a33..a54e941 100644
--- a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfiguration.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/config/InmemoryConfiguration.java
@@ -14,33 +14,45 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.governance.support.nop;
+package org.apache.dubbo.common.config;
 
-import org.apache.dubbo.governance.AbstractDynamicConfiguration;
-import org.apache.dubbo.governance.ConfigurationListener;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 /**
  *
  */
-public class NopDynamicConfiguration extends AbstractDynamicConfiguration {
+public class InmemoryConfiguration extends AbstractPrefixConfiguration {
 
-    @Override
-    public void init() {
+    /**
+     * stores the configuration key-value pairs
+     */
+    private Map<String, String> store = new LinkedHashMap<>();
 
+    public InmemoryConfiguration(String prefix, String id) {
+        super(prefix, id);
     }
 
-    @Override
-    protected String getInternalProperty(String key, String group, long timeout) {
-        return null;
+    public InmemoryConfiguration() {
+        this(null, null);
     }
 
     @Override
-    protected void addTargetListener(String key, Object o) {
+    protected Object getInternalProperty(String key) {
+        return store.get(key);
+    }
 
+    /**
+     * Replace previous value if there is one
+     *
+     * @param key
+     * @param value
+     */
+    public void addProperty(String key, String value) {
+        store.put(key, value);
     }
 
-    @Override
-    protected Object createTargetConfigListener(String key, ConfigurationListener listener) {
-        return null;
+    public void addProperties(Map<String, String> properties) {
+        store.putAll(properties);
     }
 }
diff --git a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfiguration.java b/dubbo-common/src/main/java/org/apache/dubbo/common/config/PropertiesConfiguration.java
similarity index 57%
copy from dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfiguration.java
copy to dubbo-common/src/main/java/org/apache/dubbo/common/config/PropertiesConfiguration.java
index e773a33..3a11c31 100644
--- a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfiguration.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/config/PropertiesConfiguration.java
@@ -14,33 +14,25 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.governance.support.nop;
+package org.apache.dubbo.common.config;
 
-import org.apache.dubbo.governance.AbstractDynamicConfiguration;
-import org.apache.dubbo.governance.ConfigurationListener;
+import org.apache.dubbo.common.logger.Logger;
+import org.apache.dubbo.common.logger.LoggerFactory;
+import org.apache.dubbo.common.utils.ConfigUtils;
 
-/**
- *
- */
-public class NopDynamicConfiguration extends AbstractDynamicConfiguration {
-
-    @Override
-    public void init() {
+public class PropertiesConfiguration extends AbstractPrefixConfiguration {
+    private static final Logger logger = LoggerFactory.getLogger(PropertiesConfiguration.class);
 
+    public PropertiesConfiguration(String prefix, String id) {
+        super(prefix, id);
     }
 
-    @Override
-    protected String getInternalProperty(String key, String group, long timeout) {
-        return null;
-    }
-
-    @Override
-    protected void addTargetListener(String key, Object o) {
-
+    public PropertiesConfiguration() {
+        this(null, null);
     }
 
     @Override
-    protected Object createTargetConfigListener(String key, ConfigurationListener listener) {
-        return null;
+    protected Object getInternalProperty(String key) {
+        return ConfigUtils.getProperty(key);
     }
 }
diff --git a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/DynamicConfigurationFactory.java b/dubbo-common/src/main/java/org/apache/dubbo/common/config/SystemConfiguration.java
similarity index 67%
copy from dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/DynamicConfigurationFactory.java
copy to dubbo-common/src/main/java/org/apache/dubbo/common/config/SystemConfiguration.java
index d4e8930..853fdf2 100644
--- a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/DynamicConfigurationFactory.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/config/SystemConfiguration.java
@@ -14,20 +14,24 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.governance;
-
-import org.apache.dubbo.common.Constants;
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.common.extension.Adaptive;
-import org.apache.dubbo.common.extension.SPI;
+package org.apache.dubbo.common.config;
 
 /**
  *
  */
-@SPI("nop")
-public interface DynamicConfigurationFactory {
+public class SystemConfiguration extends AbstractPrefixConfiguration {
+
+    public SystemConfiguration(String prefix, String id) {
+        super(prefix, id);
+    }
+
+    public SystemConfiguration() {
+        this(null, null);
+    }
 
-    @Adaptive({Constants.CONFIG_TYPE_KEY})
-    DynamicConfiguration getDynamicConfiguration(URL url);
+    @Override
+    protected Object getInternalProperty(String key) {
+        return System.getProperty(key);
+    }
 
 }
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/extension/ExtensionLoader.java b/dubbo-common/src/main/java/org/apache/dubbo/common/extension/ExtensionLoader.java
index e402a21..2e07a86 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/extension/ExtensionLoader.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/extension/ExtensionLoader.java
@@ -43,6 +43,7 @@ import java.util.TreeSet;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.regex.Pattern;
+import java.util.stream.Collectors;
 
 /**
  * Load dubbo extensions
@@ -298,6 +299,14 @@ public class ExtensionLoader<T> {
         return Collections.unmodifiableSet(new TreeSet<String>(cachedInstances.keySet()));
     }
 
+    public Set<Object> getLoadedExtensionInstances() {
+        return Collections.unmodifiableSet(cachedInstances.values().stream().map(Holder::get).collect(Collectors.toSet()));
+    }
+
+    public Object getLoadedAdaptiveExtensionInstances() {
+        return cachedAdaptiveInstance.get();
+    }
+
     /**
      * Find the extension with the given name. If the specified name is not found, then {@link IllegalStateException}
      * will be thrown.
diff --git a/dubbo-config/dubbo-config-api/pom.xml b/dubbo-config/dubbo-config-api/pom.xml
index c00e022..71bf8bc 100644
--- a/dubbo-config/dubbo-config-api/pom.xml
+++ b/dubbo-config/dubbo-config-api/pom.xml
@@ -31,11 +31,6 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.dubbo</groupId>
-            <artifactId>dubbo-registry-api</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.dubbo</groupId>
             <artifactId>dubbo-metadata-report-api</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractConfig.java
index a4b037b..be98ae4 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractConfig.java
@@ -18,15 +18,19 @@ package org.apache.dubbo.config;
 
 import org.apache.dubbo.common.Constants;
 import org.apache.dubbo.common.URL;
+import org.apache.dubbo.common.config.CompositeConfiguration;
+import org.apache.dubbo.common.config.Configuration;
 import org.apache.dubbo.common.extension.ExtensionLoader;
 import org.apache.dubbo.common.logger.Logger;
 import org.apache.dubbo.common.logger.LoggerFactory;
 import org.apache.dubbo.common.utils.CollectionUtils;
-import org.apache.dubbo.common.utils.ConfigUtils;
 import org.apache.dubbo.common.utils.ReflectUtils;
 import org.apache.dubbo.common.utils.StringUtils;
+import org.apache.dubbo.config.context.Environment;
 import org.apache.dubbo.config.support.Parameter;
+import org.apache.dubbo.config.utils.ConfigConverter;
 
+import javax.annotation.PostConstruct;
 import java.io.Serializable;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
@@ -62,6 +66,9 @@ public abstract class AbstractConfig implements Serializable {
     private static final Map<String, String> legacyProperties = new HashMap<String, String>();
     private static final String[] SUFFIXES = new String[]{"Config", "Bean"};
 
+    private boolean init;
+    private volatile Map<String, String> metaData;
+
     static {
         legacyProperties.put("dubbo.protocol.name", "dubbo.service.protocol");
         legacyProperties.put("dubbo.protocol.host", "dubbo.service.server.host");
@@ -71,9 +78,6 @@ public abstract class AbstractConfig implements Serializable {
         legacyProperties.put("dubbo.consumer.retries", "dubbo.service.max.retry.providers");
         legacyProperties.put("dubbo.consumer.check", "dubbo.service.allow.no.provider");
         legacyProperties.put("dubbo.service.url", "dubbo.service.address");
-
-        // this is only for compatibility
-        Runtime.getRuntime().addShutdownHook(DubboShutdownHook.getDubboShutdownHook());
     }
 
     protected String id;
@@ -89,73 +93,6 @@ public abstract class AbstractConfig implements Serializable {
         return value;
     }
 
-    protected static void appendProperties(AbstractConfig config) {
-        if (config == null) {
-            return;
-        }
-        String prefix = "dubbo." + getTagName(config.getClass()) + ".";
-        Method[] methods = config.getClass().getMethods();
-        for (Method method : methods) {
-            try {
-                String name = method.getName();
-                if (name.length() > 3 && name.startsWith("set") && Modifier.isPublic(method.getModifiers())
-                        && method.getParameterTypes().length == 1 && isPrimitive(method.getParameterTypes()[0])) {
-                    String property = StringUtils.camelToSplitName(name.substring(3, 4).toLowerCase() + name.substring(4), ".");
-
-                    String value = null;
-                    if (config.getId() != null && config.getId().length() > 0) {
-                        String pn = prefix + config.getId() + "." + property;
-                        value = System.getProperty(pn);
-                        if (!StringUtils.isBlank(value)) {
-                            logger.info("Use System Property " + pn + " to config dubbo");
-                        }
-                    }
-                    if (value == null || value.length() == 0) {
-                        String pn = prefix + property;
-                        value = System.getProperty(pn);
-                        if (!StringUtils.isBlank(value)) {
-                            logger.info("Use System Property " + pn + " to config dubbo");
-                        }
-                    }
-                    if (value == null || value.length() == 0) {
-                        Method getter;
-                        try {
-                            getter = config.getClass().getMethod("get" + name.substring(3));
-                        } catch (NoSuchMethodException e) {
-                            try {
-                                getter = config.getClass().getMethod("is" + name.substring(3));
-                            } catch (NoSuchMethodException e2) {
-                                getter = null;
-                            }
-                        }
-                        if (getter != null) {
-                            if (getter.invoke(config) == null) {
-                                if (config.getId() != null && config.getId().length() > 0) {
-                                    value = ConfigUtils.getProperty(prefix + config.getId() + "." + property);
-                                }
-                                if (value == null || value.length() == 0) {
-                                    value = ConfigUtils.getProperty(prefix + property);
-                                }
-                                if (value == null || value.length() == 0) {
-                                    String legacyKey = legacyProperties.get(prefix + property);
-                                    if (legacyKey != null && legacyKey.length() > 0) {
-                                        value = convertLegacyValue(legacyKey, ConfigUtils.getProperty(legacyKey));
-                                    }
-                                }
-
-                            }
-                        }
-                    }
-                    if (value != null && value.length() > 0) {
-                        method.invoke(config, convertPrimitive(method.getParameterTypes()[0], value));
-                    }
-                }
-            } catch (Exception e) {
-                logger.error(e.getMessage(), e);
-            }
-        }
-    }
-
     private static String getTagName(Class<?> cls) {
         String tag = cls.getSimpleName();
         for (String suffix : SUFFIXES) {
@@ -445,6 +382,155 @@ public abstract class AbstractConfig implements Serializable {
         }
     }
 
+
+    /**
+     * Should be called after Config was fully initialized.
+     *
+     * @return
+     */
+    public Map<String, String> getMetaData() {
+        metaData = new HashMap<>();
+        Method[] methods = this.getClass().getMethods();
+        for (Method method : methods) {
+            try {
+                String name = method.getName();
+                if ((name.startsWith("get") || name.startsWith("is"))
+                        && !name.equals("get")
+                        && !"getClass".equals(name)
+                        && Modifier.isPublic(method.getModifiers())
+                        && method.getParameterTypes().length == 0
+                        && isPrimitive(method.getReturnType())) {
+                    int i = name.startsWith("get") ? 3 : 2;
+                    String prop = StringUtils.camelToSplitName(name.substring(i, i + 1).toLowerCase() + name.substring(i + 1), ".");
+                    String key;
+                    Parameter parameter = method.getAnnotation(Parameter.class);
+                    if (parameter != null && parameter.key().length() > 0) {
+                        key = parameter.key();
+                    } else {
+                        key = prop;
+                    }
+                    if (method.getReturnType() == Object.class || parameter != null && parameter.excluded()) {
+                        metaData.put(key, null);
+                        continue;
+                    }
+                    Object value = method.invoke(this);
+                    String str = String.valueOf(value).trim();
+                    if (value != null && str.length() > 0) {
+                        if (parameter != null && parameter.escaped()) {
+                            str = URL.encode(str);
+                        }
+                        if (parameter != null && parameter.append()) {
+                            String pre = String.valueOf(metaData.get(Constants.DEFAULT_KEY + "." + key));
+                            if (pre != null && pre.length() > 0) {
+                                str = pre + "," + str;
+                            }
+                            pre = String.valueOf(metaData.get(key));
+                            if (pre != null && pre.length() > 0) {
+                                str = pre + "," + str;
+                            }
+                        }
+                      /*  if (prefix != null && prefix.length() > 0) {
+                            key = prefix + "." + key;
+                        }*/
+                        metaData.put(key, str);
+                    } else {
+                        metaData.put(key, null);
+                    }
+                    // TODO check required somewhere else.
+                    /*else if (parameter != null && parameter.required()) {
+                        throw new IllegalStateException(this.getClass().getSimpleName() + "." + key + " == null");
+                    }*/
+                } else if ("getParameters".equals(name)
+                        && Modifier.isPublic(method.getModifiers())
+                        && method.getParameterTypes().length == 0
+                        && method.getReturnType() == Map.class) {
+                    Map<String, String> map = (Map<String, String>) method.invoke(this, new Object[0]);
+                    if (map != null && map.size() > 0) {
+//                            String pre = (prefix != null && prefix.length() > 0 ? prefix + "." : "");
+                        for (Map.Entry<String, String> entry : map.entrySet()) {
+                            metaData.put(entry.getKey().replace('-', '.'), entry.getValue());
+                        }
+                    }
+                }
+            } catch (Exception e) {
+                System.out.println(this.getClass().getName());
+                System.out.println(method.getName());
+                throw new IllegalStateException(e.getMessage(), e);
+            }
+        }
+        return metaData;
+    }
+
+    public String getPrefix() {
+        return Constants.DUBBO + "." + getTagName(this.getClass());
+    }
+
+    /**
+     * TODO
+     * Currently, only support overriding of properties explicitly defined in Config class, doesn't support overriding of customized parameters stored in 'parameters'.
+     */
+    @PostConstruct
+    public void refresh() {
+        if (init) {
+            return;
+        }
+        init = true;
+
+        try {
+            Configuration configuration = ConfigConverter.toConfiguration(this);
+            CompositeConfiguration compositeConfiguration = Environment.getInstance().getStartupCompositeConf(getPrefix(), getId());
+            int index = 1;
+            if (Environment.getInstance().isConfigCenterFirst()) {
+                index = 2;
+            }
+            compositeConfiguration.addConfiguration(index, configuration);
+            // loop methods, get override value and set the new value back to method
+            Method[] methods = getClass().getMethods();
+            for (Method method : methods) {
+                if (isSetter(method)) {
+                    try {
+                        String value = compositeConfiguration.getString(extractPropertyName(method));
+                        if (value != null) {
+                            method.invoke(this, convertPrimitive(method.getParameterTypes()[0], value));
+                        }
+                    } catch (NoSuchMethodException e) {
+                        logger.warn("Failed to override the property " + method.getName() + " in " + this.getClass().getSimpleName() + ", please make sure every property has a getter/setter pair.");
+                    }
+                }
+            }
+        } catch (Exception e) {
+            logger.error("Failed to override ", e);
+        }
+    }
+
+    private static boolean isSetter(Method method) {
+        if (method.getName().startsWith("set")
+                && !"set".equals(method.getName())
+                && Modifier.isPublic(method.getModifiers())
+                && method.getParameterCount() == 1
+                && isPrimitive(method.getParameterTypes()[0])) {
+            return true;
+        }
+        return false;
+    }
+
+    public String extractPropertyName(Method setter) throws Exception {
+        String propertyName = setter.getName().substring("set".length());
+        Method getter = null;
+        try {
+            getter = getClass().getMethod("get" + propertyName);
+        } catch (NoSuchMethodException e) {
+            getter = getClass().getMethod("is" + propertyName);
+        }
+        Parameter parameter = getter.getAnnotation(Parameter.class);
+        if (parameter != null && StringUtils.isNotEmpty(parameter.key())) {
+            propertyName = parameter.key();
+        } else {
+            propertyName = propertyName.toLowerCase();
+        }
+        return propertyName;
+    }
+
     @Override
     public String toString() {
         try {
@@ -483,4 +569,11 @@ public abstract class AbstractConfig implements Serializable {
         }
     }
 
+    /**
+     * FIXME check @Parameter(required=true) and any conditions that need to match.
+     */
+    public boolean isValid() {
+        return true;
+    }
+
 }
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java
index 591fb80..f468f85 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java
@@ -26,17 +26,15 @@ import org.apache.dubbo.common.utils.ReflectUtils;
 import org.apache.dubbo.common.utils.StringUtils;
 import org.apache.dubbo.common.utils.UrlUtils;
 import org.apache.dubbo.config.support.Parameter;
+import org.apache.dubbo.metadata.integration.MetadataReportService;
+import org.apache.dubbo.metadata.store.MetadataReportFactory;
 import org.apache.dubbo.monitor.MonitorFactory;
 import org.apache.dubbo.monitor.MonitorService;
-import org.apache.dubbo.registry.RegistryFactory;
-import org.apache.dubbo.registry.RegistryService;
 import org.apache.dubbo.rpc.Filter;
 import org.apache.dubbo.rpc.InvokerListener;
 import org.apache.dubbo.rpc.ProxyFactory;
 import org.apache.dubbo.rpc.cluster.Cluster;
 import org.apache.dubbo.rpc.support.MockInvoker;
-import org.apache.dubbo.metadata.store.MetadataReportFactory;
-import org.apache.dubbo.metadata.integration.MetadataReportService;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -106,9 +104,9 @@ public abstract class AbstractInterfaceConfig extends AbstractMethodConfig {
 
     protected ServiceStoreConfig serviceStoreConfig;
 
-
     protected void checkRegistry() {
         // for backward compatibility
+        // -Ddubbo.registry.address is now deprecated.
         if (registries == null || registries.isEmpty()) {
             String address = ConfigUtils.getProperty("dubbo.registry.address");
             if (address != null && address.length() > 0) {
@@ -121,17 +119,21 @@ public abstract class AbstractInterfaceConfig extends AbstractMethodConfig {
                 }
             }
         }
-        if ((registries == null || registries.isEmpty())) {
-            throw new IllegalStateException((getClass().getSimpleName().startsWith("Reference")
-                    ? "No such any registry to refer service in consumer "
-                    : "No such any registry to export service in provider ")
-                    + NetUtils.getLocalHost()
-                    + " use dubbo version "
-                    + Version.getVersion()
-                    + ", Please add <dubbo:registry address=\"...\" /> to your spring config. If you want unregister, please set <dubbo:service registry=\"N/A\" />");
+
+        if (registries == null || registries.isEmpty()) {
+            registries = new ArrayList<>();
+            RegistryConfig registryConfig = new RegistryConfig();
+            registries.add(registryConfig);
+        }
+
+        for (RegistryConfig registryConfig : registries) {
+            registryConfig.refresh();
         }
+
         for (RegistryConfig registryConfig : registries) {
-            appendProperties(registryConfig);
+            if (!registryConfig.isValid()) {
+                throw new IllegalStateException("No registry config found or it's not a valid config!");
+            }
         }
     }
 
@@ -139,16 +141,15 @@ public abstract class AbstractInterfaceConfig extends AbstractMethodConfig {
     protected void checkApplication() {
         // for backward compatibility
         if (application == null) {
-            String applicationName = ConfigUtils.getProperty("dubbo.application.name");
-            if (applicationName != null && applicationName.length() > 0) {
-                application = new ApplicationConfig();
-            }
+            application = new ApplicationConfig();
         }
-        if (application == null) {
+
+        application.refresh();
+
+        if (!application.isValid()) {
             throw new IllegalStateException(
-                    "No such application config! Please add <dubbo:application name=\"...\" /> to your spring config.");
+                    "No application config found or it's not a valid config! Please add <dubbo:application name=\"...\" /> to your spring config.");
         }
-        appendProperties(application);
 
         String wait = ConfigUtils.getProperty(Constants.SHUTDOWN_WAIT_KEY);
         if (wait != null && wait.trim().length() > 0) {
@@ -161,7 +162,30 @@ public abstract class AbstractInterfaceConfig extends AbstractMethodConfig {
         }
     }
 
+    protected void checkMonitor() {
+        if (monitor == null) {
+            monitor = new MonitorConfig();
+        }
+
+        monitor.refresh();
+
+        if (!monitor.isValid()) {
+            logger.info("There's no valid monitor config found, if you want to open monitor statistics for Dubbo, please make sure your monitor is configured properly.");
+        }
+    }
+
+    public void checkServiceStore() {
+        if (serviceStoreConfig == null) {
+            serviceStoreConfig = new ServiceStoreConfig();
+        }
+        serviceStoreConfig.refresh();
+        if (!serviceStoreConfig.isValid()) {
+            logger.info("There's no valid metadata config found, if you are using the simplified mode of registry url, please make sure you have a metadata address configured properly.");
+        }
+    }
+
     protected List<URL> loadRegistries(boolean provider) {
+        // check && override if necessary
         checkRegistry();
         List<URL> registryList = new ArrayList<URL>();
         if (registries != null && !registries.isEmpty()) {
@@ -170,26 +194,19 @@ public abstract class AbstractInterfaceConfig extends AbstractMethodConfig {
                 if (address == null || address.length() == 0) {
                     address = Constants.ANYHOST_VALUE;
                 }
-                String sysaddress = System.getProperty("dubbo.registry.address");
-                if (sysaddress != null && sysaddress.length() > 0) {
-                    address = sysaddress;
-                }
                 if (address.length() > 0 && !RegistryConfig.NO_AVAILABLE.equalsIgnoreCase(address)) {
                     Map<String, String> map = new HashMap<String, String>();
                     appendParameters(map, application);
                     appendParameters(map, config);
-                    map.put("path", RegistryService.class.getName());
+                    //TODO temporarily use literal value to avoid depending on dubbo-registry-api module.
+                    map.put("path", "org.apache.dubbo.registry.RegistryService");
                     map.put("dubbo", Version.getProtocolVersion());
                     map.put(Constants.TIMESTAMP_KEY, String.valueOf(System.currentTimeMillis()));
                     if (ConfigUtils.getPid() > 0) {
                         map.put(Constants.PID_KEY, String.valueOf(ConfigUtils.getPid()));
                     }
                     if (!map.containsKey("protocol")) {
-                        if (ExtensionLoader.getExtensionLoader(RegistryFactory.class).hasExtension("remote")) {
-                            map.put("protocol", "remote");
-                        } else {
-                            map.put("protocol", "dubbo");
-                        }
+                        map.put("protocol", "dubbo");
                     }
                     List<URL> urls = UrlUtils.parseURLs(address, map);
                     for (URL url : urls) {
@@ -207,22 +224,7 @@ public abstract class AbstractInterfaceConfig extends AbstractMethodConfig {
     }
 
     protected URL loadMonitor(URL registryURL) {
-        if (monitor == null) {
-            String monitorAddress = ConfigUtils.getProperty("dubbo.monitor.address");
-            String monitorProtocol = ConfigUtils.getProperty("dubbo.monitor.protocol");
-            if ((monitorAddress == null || monitorAddress.length() == 0) && (monitorProtocol == null || monitorProtocol.length() == 0)) {
-                return null;
-            }
-
-            monitor = new MonitorConfig();
-            if (monitorAddress != null && monitorAddress.length() > 0) {
-                monitor.setAddress(monitorAddress);
-            }
-            if (monitorProtocol != null && monitorProtocol.length() > 0) {
-                monitor.setProtocol(monitorProtocol);
-            }
-        }
-        appendProperties(monitor);
+        checkMonitor();
         Map<String, String> map = new HashMap<String, String>();
         map.put(Constants.INTERFACE_KEY, MonitorService.class.getName());
         map.put("dubbo", Version.getProtocolVersion());
@@ -301,7 +303,7 @@ public abstract class AbstractInterfaceConfig extends AbstractMethodConfig {
     }
 
     protected MetadataReportService getServiceStoreService() {
-        if (serviceStoreConfig == null) {
+        if (serviceStoreConfig == null || !serviceStoreConfig.isValid()) {
             return null;
         }
         return MetadataReportService.instance(() -> {
@@ -321,6 +323,9 @@ public abstract class AbstractInterfaceConfig extends AbstractMethodConfig {
         // check if methods exist in the interface
         if (methods != null && !methods.isEmpty()) {
             for (MethodConfig methodBean : methods) {
+                methodBean.setService(interfaceClass.getName());
+                methodBean.setServiceId(this.getId());
+                methodBean.refresh();
                 String methodName = methodBean.getName();
                 if (methodName == null || methodName.length() == 0) {
                     throw new IllegalStateException("<dubbo:method> name attribute is required! Please check: <dubbo:service interface=\"" + interfaceClass.getName() + "\" ... ><dubbo:method name=\"\" ... /></<dubbo:reference>");
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ApplicationConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ApplicationConfig.java
index 9979ed6..6328725 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ApplicationConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ApplicationConfig.java
@@ -19,6 +19,7 @@ package org.apache.dubbo.config;
 import org.apache.dubbo.common.Constants;
 import org.apache.dubbo.common.compiler.support.AdaptiveCompiler;
 import org.apache.dubbo.common.logger.LoggerFactory;
+import org.apache.dubbo.common.utils.StringUtils;
 import org.apache.dubbo.config.support.Parameter;
 
 import java.util.ArrayList;
@@ -289,4 +290,8 @@ public class ApplicationConfig extends AbstractConfig {
         System.setProperty( Constants.SHUTDOWN_WAIT_KEY, shutwait);
         this.shutwait = shutwait;
     }
+
+    public boolean isValid() {
+        return !StringUtils.isEmpty(name);
+    }
 }
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java
new file mode 100644
index 0000000..9c4dc63
--- /dev/null
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java
@@ -0,0 +1,219 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.config;
+
+import org.apache.dubbo.common.Constants;
+import org.apache.dubbo.common.URL;
+import org.apache.dubbo.common.extension.ExtensionLoader;
+import org.apache.dubbo.common.utils.StringUtils;
+import org.apache.dubbo.config.context.Environment;
+import org.apache.dubbo.config.support.Parameter;
+import org.apache.dubbo.governance.DynamicConfiguration;
+import org.apache.dubbo.governance.DynamicConfigurationFactory;
+
+import javax.annotation.PostConstruct;
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ *
+ */
+public class ConfigCenterConfig extends AbstractConfig {
+    private String type;
+    private String address;
+    private String env;
+    private String cluster;
+    private String namespace;
+    private String appnamespace;
+    private String username;
+    private String password;
+    private long timeout;
+    private boolean priority;
+    private boolean check;
+
+    private String dataid;
+
+    // customized parameters
+    private Map<String, String> parameters;
+
+//    private RegistryConfig registry;
+
+    public ConfigCenterConfig() {
+    }
+
+    private URL toConfigUrl() {
+        String host = address;
+        int port = 0;
+        try {
+            if (StringUtils.isNotEmpty(address)) {
+                String[] addrs = address.split(":");
+                if (addrs.length == 2) {
+                    host = addrs[0];
+                    port = Integer.parseInt(addrs[1]);
+                }
+            }
+        } catch (Exception e) {
+            throw e;
+        }
+
+        Map<String, String> map = this.getMetaData();
+        return new URL("config", username, password, host, port, ConfigCenterConfig.class.getSimpleName(), map);
+    }
+
+    @PostConstruct
+    public void init() throws Exception {
+        // give jvm properties the chance of overriding local configs.
+        refresh();
+
+        URL url = toConfigUrl();
+        DynamicConfiguration dynamicConfiguration = ExtensionLoader.getExtensionLoader(DynamicConfigurationFactory.class).getAdaptiveExtension().getDynamicConfiguration(url);
+        String configContent = dynamicConfiguration.getConfig(dataid, namespace);
+        try {
+            if (configContent == null) {
+                logger.warn("You specified the config centre, but there's not even one single config item in it.");
+            } else {
+                Properties properties = new Properties();
+                properties.load(new StringReader(configContent));
+                Map<String, String> map = new HashMap<>();
+                properties.stringPropertyNames().forEach(
+                        k -> map.put(k, properties.getProperty(k))
+                );
+                Environment.getInstance().setConfigCenterFirst(priority);
+                Environment.getInstance().updateExternalConfiguration(map);
+            }
+        } catch (IOException e) {
+            throw e;
+        }
+    }
+
+    @Parameter(key = Constants.CONFIG_TYPE_KEY)
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    @Parameter(key = Constants.CONFIG_ADDRESS_KEY)
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    @Parameter(key = Constants.CONFIG_ENV_KEY)
+    public String getEnv() {
+        return env;
+    }
+
+    public void setEnv(String env) {
+        this.env = env;
+    }
+
+    @Parameter(key = Constants.CONFIG_CLUSTER_KEY)
+    public String getCluster() {
+        return cluster;
+    }
+
+    public void setCluster(String cluster) {
+        this.cluster = cluster;
+    }
+
+    @Parameter(key = Constants.CONFIG_NAMESPACE_KEY)
+    public String getNamespace() {
+        return namespace;
+    }
+
+    public void setNamespace(String namespace) {
+        this.namespace = namespace;
+    }
+
+    @Parameter(key = "config.appnamespace")
+    public String getAppnamespace() {
+        return appnamespace;
+    }
+
+    public void setAppnamespace(String appnamespace) {
+        this.appnamespace = appnamespace;
+    }
+
+    @Parameter(key = Constants.CONFIG_CHECK_KEY)
+    public boolean isCheck() {
+        return check;
+    }
+
+    public void setCheck(boolean check) {
+        this.check = check;
+    }
+
+    @Parameter(key = "config.priority")
+    public boolean isPriority() {
+        return priority;
+    }
+
+    public void setPriority(boolean priority) {
+        this.priority = priority;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    @Parameter(key = "config.timeout")
+    public long getTimeout() {
+        return timeout;
+    }
+
+    public void setTimeout(long timeout) {
+        this.timeout = timeout;
+    }
+
+    public String getDataid() {
+        return dataid;
+    }
+
+    public void setDataid(String dataid) {
+        this.dataid = dataid;
+    }
+
+    public Map<String, String> getParameters() {
+        return parameters;
+    }
+
+    public void setParameters(Map<String, String> parameters) {
+        checkParameterName(parameters);
+        this.parameters = parameters;
+    }
+}
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/MethodConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/MethodConfig.java
index ac00b94..b04cc83 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/MethodConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/MethodConfig.java
@@ -17,6 +17,7 @@
 package org.apache.dubbo.config;
 
 import org.apache.dubbo.common.Constants;
+import org.apache.dubbo.common.utils.StringUtils;
 import org.apache.dubbo.config.support.Parameter;
 
 import java.util.List;
@@ -74,6 +75,12 @@ public class MethodConfig extends AbstractMethodConfig {
 
     private List<ArgumentConfig> arguments;
 
+    /**
+     * These properties come from MethodConfig's parent Config module, they will neither be collected directly from xml or API nor be delivered to url
+     */
+    private String service;
+    private String serviceId;
+
     @Parameter(excluded = true)
     public String getName() {
         return name;
@@ -211,4 +218,28 @@ public class MethodConfig extends AbstractMethodConfig {
         this.isReturn = isReturn;
     }
 
+    @Parameter(excluded = true)
+    public String getService() {
+        return service;
+    }
+
+    public void setService(String service) {
+        this.service = service;
+    }
+
+    @Parameter(excluded = true)
+    public String getServiceId() {
+        return serviceId;
+    }
+
+    public void setServiceId(String serviceId) {
+        this.serviceId = serviceId;
+    }
+
+    @Override
+    public String getPrefix() {
+        return Constants.DUBBO + "." + service
+                + (StringUtils.isEmpty(serviceId) ? "" : ("." + serviceId))
+                + "." + getName();
+    }
 }
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/MonitorConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/MonitorConfig.java
index 55155af..a662256 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/MonitorConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/MonitorConfig.java
@@ -16,6 +16,7 @@
  */
 package org.apache.dubbo.config;
 
+import org.apache.dubbo.common.utils.StringUtils;
 import org.apache.dubbo.config.support.Parameter;
 
 import java.util.Map;
@@ -133,4 +134,8 @@ public class MonitorConfig extends AbstractConfig {
         return interval;
     }
 
+    public boolean isValid() {
+        return StringUtils.isNotEmpty(address);
+    }
+
 }
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ProtocolConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ProtocolConfig.java
index 3ae3329..e01b243 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ProtocolConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ProtocolConfig.java
@@ -470,13 +470,4 @@ public class ProtocolConfig extends AbstractConfig {
             ExtensionLoader.getExtensionLoader(Protocol.class).getExtension(name).destroy();
         }
     }
-
-    /**
-     * Just for compatibility.
-     * It should be deleted in the next major version, say 2.7.x.
-     */
-    @Deprecated
-    public static void destroyAll() {
-        DubboShutdownHook.getDubboShutdownHook().destroyAll();
-    }
 }
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
index 7b6ebd8..927fe51 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
@@ -30,6 +30,7 @@ import org.apache.dubbo.config.annotation.Reference;
 import org.apache.dubbo.config.model.ApplicationModel;
 import org.apache.dubbo.config.model.ConsumerModel;
 import org.apache.dubbo.config.support.Parameter;
+import org.apache.dubbo.metadata.integration.MetadataReportService;
 import org.apache.dubbo.rpc.Invoker;
 import org.apache.dubbo.rpc.Protocol;
 import org.apache.dubbo.rpc.ProxyFactory;
@@ -41,7 +42,6 @@ import org.apache.dubbo.rpc.cluster.support.RegistryAwareCluster;
 import org.apache.dubbo.rpc.protocol.injvm.InjvmProtocol;
 import org.apache.dubbo.rpc.service.GenericService;
 import org.apache.dubbo.rpc.support.ProtocolUtils;
-import org.apache.dubbo.metadata.integration.MetadataReportService;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -158,44 +158,17 @@ public class ReferenceConfig<T> extends AbstractReferenceConfig {
         return urls;
     }
 
-    public synchronized T get() {
-        if (destroyed) {
-            throw new IllegalStateException("Already destroyed!");
-        }
-        if (ref == null) {
-            init();
-        }
-        return ref;
-    }
-
-    public synchronized void destroy() {
-        if (ref == null) {
-            return;
-        }
-        if (destroyed) {
-            return;
-        }
-        destroyed = true;
-        try {
-            invoker.destroy();
-        } catch (Throwable t) {
-            logger.warn("Unexpected err when destroy invoker of ReferenceConfig(" + url + ").", t);
-        }
-        invoker = null;
-        ref = null;
-    }
-
-    private void init() {
-        if (initialized) {
-            return;
-        }
-        initialized = true;
+    /**
+     * This method should be called right after the creation of this class's instance, before any property in other config modules is used.
+     * Check each config modules are created properly and override their properties if necessary.
+     */
+    public void checkAndUpdateSubConfigs() {
         if (interfaceName == null || interfaceName.length() == 0) {
             throw new IllegalStateException("<dubbo:reference interface=\"\" /> interface not allow null!");
         }
         // get consumer's global configuration
         checkDefault();
-        appendProperties(this);
+        this.refresh();
         if (getGeneric() == null && getConsumer() != null) {
             setGeneric(getConsumer().getGeneric());
         }
@@ -279,6 +252,41 @@ public class ReferenceConfig<T> extends AbstractReferenceConfig {
             }
         }
         checkApplication();
+        checkServiceStore();
+    }
+
+    public synchronized T get() {
+        if (destroyed) {
+            throw new IllegalStateException("Already destroyed!");
+        }
+        if (ref == null) {
+            init();
+        }
+        return ref;
+    }
+
+    public synchronized void destroy() {
+        if (ref == null) {
+            return;
+        }
+        if (destroyed) {
+            return;
+        }
+        destroyed = true;
+        try {
+            invoker.destroy();
+        } catch (Throwable t) {
+            logger.warn("Unexpected err when destroy invoker of ReferenceConfig(" + url + ").", t);
+        }
+        invoker = null;
+        ref = null;
+    }
+
+    private void init() {
+        if (initialized) {
+            return;
+        }
+        initialized = true;
         checkStubAndMock(interfaceClass);
         Map<String, String> map = new HashMap<String, String>();
         resolveAsyncInterface(interfaceClass, map);
@@ -446,7 +454,7 @@ public class ReferenceConfig<T> extends AbstractReferenceConfig {
         if (consumer == null) {
             consumer = new ConsumerConfig();
         }
-        appendProperties(consumer);
+        consumer.refresh();
     }
 
     private void resolveAsyncInterface(Class<?> interfaceClass, Map<String, String> map) {
@@ -570,4 +578,9 @@ public class ReferenceConfig<T> extends AbstractReferenceConfig {
         return buf.toString();
     }
 
+    @Override
+    public String getPrefix() {
+        return Constants.DUBBO + ".reference" + interfaceName;
+    }
+
 }
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/RegistryConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/RegistryConfig.java
index 5678a2e..7d32077 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/RegistryConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/RegistryConfig.java
@@ -17,9 +17,9 @@
 package org.apache.dubbo.config;
 
 import org.apache.dubbo.common.Constants;
+import org.apache.dubbo.common.utils.StringUtils;
 import org.apache.dubbo.config.support.Parameter;
 
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -349,4 +349,9 @@ public class RegistryConfig extends AbstractConfig {
     public void setAddParamKeys(String addParamKeys) {
         this.addParamKeys = addParamKeys;
     }
+
+    public boolean isValid() {
+        // empty protocol will default to 'dubbo'
+        return !StringUtils.isEmpty(address);
+    }
 }
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
index 50f16dd..608b52d 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
@@ -30,6 +30,7 @@ import org.apache.dubbo.config.invoker.DelegateProviderMetaDataInvoker;
 import org.apache.dubbo.config.model.ApplicationModel;
 import org.apache.dubbo.config.model.ProviderModel;
 import org.apache.dubbo.config.support.Parameter;
+import org.apache.dubbo.metadata.integration.MetadataReportService;
 import org.apache.dubbo.rpc.Exporter;
 import org.apache.dubbo.rpc.Invoker;
 import org.apache.dubbo.rpc.Protocol;
@@ -38,7 +39,6 @@ import org.apache.dubbo.rpc.ServiceClassHolder;
 import org.apache.dubbo.rpc.cluster.ConfiguratorFactory;
 import org.apache.dubbo.rpc.service.GenericService;
 import org.apache.dubbo.rpc.support.ProtocolUtils;
-import org.apache.dubbo.metadata.integration.MetadataReportService;
 
 import java.lang.reflect.Method;
 import java.net.InetAddress;
@@ -193,42 +193,7 @@ public class ServiceConfig<T> extends AbstractServiceConfig {
         return unexported;
     }
 
-    public synchronized void export() {
-        if (provider != null) {
-            if (export == null) {
-                export = provider.getExport();
-            }
-            if (delay == null) {
-                delay = provider.getDelay();
-            }
-        }
-        if (export != null && !export) {
-            return;
-        }
-
-        if (delay != null && delay > 0) {
-            delayExportExecutor.schedule(new Runnable() {
-                @Override
-                public void run() {
-                    doExport();
-                }
-            }, delay, TimeUnit.MILLISECONDS);
-        } else {
-            doExport();
-        }
-    }
-
-    protected synchronized void doExport() {
-        if (unexported) {
-            throw new IllegalStateException("Already unexported!");
-        }
-        if (exported) {
-            return;
-        }
-        exported = true;
-        if (interfaceName == null || interfaceName.length() == 0) {
-            throw new IllegalStateException("<dubbo:service interface=\"\" /> interface not allow null!");
-        }
+    public void checkAndUpdateSubConfigs() {
         checkDefault();
         if (provider != null) {
             if (application == null) {
@@ -263,6 +228,17 @@ public class ServiceConfig<T> extends AbstractServiceConfig {
                 monitor = application.getMonitor();
             }
         }
+
+        checkApplication();
+        checkRegistry();
+        checkProtocol();
+        this.refresh();
+        checkServiceStore();
+
+        if (interfaceName == null || interfaceName.length() == 0) {
+            throw new IllegalStateException("<dubbo:service interface=\"\" /> interface not allow null!");
+        }
+
         if (ref instanceof GenericService) {
             interfaceClass = GenericService.class;
             if (StringUtils.isEmpty(generic)) {
@@ -307,11 +283,43 @@ public class ServiceConfig<T> extends AbstractServiceConfig {
                 throw new IllegalStateException("The stub implementation class " + stubClass.getName() + " not implement interface " + interfaceName);
             }
         }
-        checkApplication();
-        checkRegistry();
-        checkProtocol();
-        appendProperties(this);
         checkStubAndMock(interfaceClass);
+    }
+
+    public synchronized void export() {
+        if (provider != null) {
+            if (export == null) {
+                export = provider.getExport();
+            }
+            if (delay == null) {
+                delay = provider.getDelay();
+            }
+        }
+        if (export != null && !export) {
+            return;
+        }
+
+        if (delay != null && delay > 0) {
+            delayExportExecutor.schedule(new Runnable() {
+                @Override
+                public void run() {
+                    doExport();
+                }
+            }, delay, TimeUnit.MILLISECONDS);
+        } else {
+            doExport();
+        }
+    }
+
+    protected synchronized void doExport() {
+        if (unexported) {
+            throw new IllegalStateException("Already unexported!");
+        }
+        if (exported) {
+            return;
+        }
+        exported = true;
+
         if (path == null || path.length() == 0) {
             path = interfaceName;
         }
@@ -712,7 +720,7 @@ public class ServiceConfig<T> extends AbstractServiceConfig {
         if (provider == null) {
             provider = new ProviderConfig();
         }
-        appendProperties(provider);
+        provider.refresh();
     }
 
     private void checkProtocol() {
@@ -728,7 +736,7 @@ public class ServiceConfig<T> extends AbstractServiceConfig {
             if (StringUtils.isEmpty(protocolConfig.getName())) {
                 protocolConfig.setName(Constants.DUBBO_VERSION_KEY);
             }
-            appendProperties(protocolConfig);
+            protocolConfig.refresh();
         }
     }
 
@@ -862,4 +870,9 @@ public class ServiceConfig<T> extends AbstractServiceConfig {
         }
         return buf.toString();
     }
+
+    @Override
+    public String getPrefix() {
+        return Constants.DUBBO + ".service" + interfaceName;
+    }
 }
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceStoreConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceStoreConfig.java
index 1a31c90..88b71a7 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceStoreConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceStoreConfig.java
@@ -16,8 +16,7 @@
  */
 package org.apache.dubbo.config;
 
-import org.apache.dubbo.common.Constants;
-import org.apache.dubbo.config.support.Parameter;
+import org.apache.dubbo.common.utils.StringUtils;
 
 import java.util.Map;
 
@@ -91,4 +90,8 @@ public class ServiceStoreConfig extends AbstractConfig {
     public void setParameters(Map<String, String> parameters) {
         this.parameters = parameters;
     }
+
+    public boolean isValid() {
+        return StringUtils.isNotEmpty(address);
+    }
 }
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/context/Environment.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/context/Environment.java
new file mode 100644
index 0000000..9e4cdbb
--- /dev/null
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/context/Environment.java
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.config.context;
+
+import org.apache.dubbo.common.Constants;
+import org.apache.dubbo.common.URL;
+import org.apache.dubbo.common.config.CompositeConfiguration;
+import org.apache.dubbo.common.config.EnvironmentConfiguration;
+import org.apache.dubbo.common.config.InmemoryConfiguration;
+import org.apache.dubbo.common.config.PropertiesConfiguration;
+import org.apache.dubbo.common.config.SystemConfiguration;
+import org.apache.dubbo.common.extension.ExtensionLoader;
+import org.apache.dubbo.common.utils.CollectionUtils;
+import org.apache.dubbo.common.utils.StringUtils;
+import org.apache.dubbo.governance.DynamicConfiguration;
+import org.apache.dubbo.governance.DynamicConfigurationFactory;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * TODO load as SPI will be better?
+ */
+public class Environment {
+    private static final Environment INSTANCE = new Environment();
+
+    private volatile Map<String, PropertiesConfiguration> propertiesConfsHolder = new ConcurrentHashMap<>();
+    private volatile Map<String, SystemConfiguration> systemConfsHolder = new ConcurrentHashMap<>();
+    private volatile Map<String, EnvironmentConfiguration> environmentConfsHolder = new ConcurrentHashMap<>();
+    private volatile Map<String, CompositeConfiguration> startupCompositeConfsHolder = new ConcurrentHashMap<>();
+    private volatile Map<String, CompositeConfiguration> runtimeCompositeConfsHolder = new ConcurrentHashMap<>();
+
+    private volatile InmemoryConfiguration externalConfiguration = new InmemoryConfiguration();
+
+    private volatile boolean isConfigCenterFirst;
+
+    public static Environment getInstance() {
+        return INSTANCE;
+    }
+
+    public PropertiesConfiguration getPropertiesConf(String prefix, String id) {
+        return propertiesConfsHolder.computeIfAbsent(toKey(prefix, id), k -> new PropertiesConfiguration(prefix, id));
+    }
+
+    public SystemConfiguration getSystemConf(String prefix, String id) {
+        return systemConfsHolder.computeIfAbsent(toKey(prefix, id), k -> new SystemConfiguration(prefix, id));
+    }
+
+    public EnvironmentConfiguration getEnvironmentConf(String prefix, String id) {
+        return environmentConfsHolder.computeIfAbsent(toKey(prefix, id), k -> new EnvironmentConfiguration(prefix, id));
+    }
+
+    public void updateExternalConfiguration(Map<String, String> externalMap) {
+        this.externalConfiguration.addProperties(externalMap);
+    }
+
+    public CompositeConfiguration getStartupCompositeConf(String prefix, String id) {
+        return startupCompositeConfsHolder.computeIfAbsent(toKey(prefix, id), k -> {
+            CompositeConfiguration compositeConfiguration = new CompositeConfiguration();
+            compositeConfiguration.addConfiguration(this.getSystemConf(prefix, id));
+            compositeConfiguration.addConfiguration(this.externalConfiguration);
+            compositeConfiguration.addConfiguration(this.getPropertiesConf(prefix, id));
+            return compositeConfiguration;
+        });
+    }
+
+    public CompositeConfiguration getRuntimeCompositeConf(URL url) {
+        return runtimeCompositeConfsHolder.computeIfAbsent(url.toIdentityString(), k -> {
+            CompositeConfiguration compositeConfiguration = new CompositeConfiguration();
+            compositeConfiguration.addConfiguration(getDynamicConfiguration());
+            compositeConfiguration.addConfiguration(this.getSystemConf(null, null));
+            compositeConfiguration.addConfiguration(url.toConfiguration());
+            compositeConfiguration.addConfiguration(this.getPropertiesConf(null, null));
+            return compositeConfiguration;
+        });
+    }
+
+    /**
+     * If user opens DynamicConfig, the extension instance must has been created during the initialization of ConfigCenterConfig with the right extension type user specified.
+     * If no DynamicConfig presents, NopDynamicConfiguration will be used.
+     *
+     * @return
+     */
+    public DynamicConfiguration getDynamicConfiguration() {
+        ExtensionLoader<DynamicConfigurationFactory> factoryLoader = ExtensionLoader.getExtensionLoader(DynamicConfigurationFactory.class);
+        Set<Object> factories = factoryLoader.getLoadedExtensionInstances();
+        if (CollectionUtils.isEmpty(factories)) {
+            return factoryLoader.getDefaultExtension().getDynamicConfiguration(null);
+        }
+
+        return ((DynamicConfigurationFactory) factories.iterator().next()).getExistedDynamicConfiguration();
+    }
+
+    private static String toKey(String keypart1, String keypart2) {
+        StringBuilder sb = new StringBuilder();
+        if (StringUtils.isNotEmpty(keypart1)) {
+            sb.append(keypart1);
+        }
+        if (StringUtils.isNotEmpty(keypart2)) {
+            sb.append(keypart2);
+        }
+
+        if (sb.length() > 0 && sb.charAt(sb.length() - 1) != '.') {
+            sb.append(".");
+        }
+
+        if (sb.length() > 0) {
+            return sb.toString();
+        }
+        return Constants.DUBBO;
+    }
+
+    public boolean isConfigCenterFirst() {
+        return isConfigCenterFirst;
+    }
+
+    public void setConfigCenterFirst(boolean configCenterFirst) {
+        isConfigCenterFirst = configCenterFirst;
+    }
+}
diff --git a/dubbo-governance/dubbo-governance-apollo/src/main/java/org/apache/dubbo/governance/support/apollo/ApolloDynamicConfigurationFactory.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigConverter.java
similarity index 57%
copy from dubbo-governance/dubbo-governance-apollo/src/main/java/org/apache/dubbo/governance/support/apollo/ApolloDynamicConfigurationFactory.java
copy to dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigConverter.java
index 5117a6f..bca4233 100644
--- a/dubbo-governance/dubbo-governance-apollo/src/main/java/org/apache/dubbo/governance/support/apollo/ApolloDynamicConfigurationFactory.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigConverter.java
@@ -14,26 +14,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.dubbo.governance.support.apollo;
+package org.apache.dubbo.config.utils;
 
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.governance.DynamicConfiguration;
-import org.apache.dubbo.governance.DynamicConfigurationFactory;
+import org.apache.dubbo.common.config.Configuration;
+import org.apache.dubbo.common.config.InmemoryConfiguration;
+import org.apache.dubbo.config.AbstractConfig;
 
 /**
  *
  */
-public class ApolloDynamicConfigurationFactory implements DynamicConfigurationFactory {
+public class ConfigConverter {
+    private static final String[] SUFFIXES = new String[]{"Config", "Bean"};
 
-    private DynamicConfiguration configuration;
-
-    @Override
-    public synchronized DynamicConfiguration getDynamicConfiguration(URL url) {
-        if (configuration == null) {
-            configuration = new ApolloDynamicConfiguration();
-            configuration.setUrl(url);
-            configuration.init();
-        }
+    /**
+     * @param config
+     * @return
+     */
+    public static Configuration toConfiguration(AbstractConfig config) {
+        InmemoryConfiguration configuration = new InmemoryConfiguration(config.getPrefix(), config.getId());
+        configuration.addProperties(config.getMetaData());
         return configuration;
     }
+
 }
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java
index ac231cb..eacb80d 100644
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java
+++ b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java
@@ -17,8 +17,6 @@
 package org.apache.dubbo.config;
 
 import junit.framework.TestCase;
-import org.apache.dubbo.common.Constants;
-import org.apache.dubbo.common.utils.ConfigUtils;
 import org.apache.dubbo.config.api.Greeting;
 import org.apache.dubbo.config.support.Parameter;
 import org.hamcrest.Matchers;
@@ -31,13 +29,13 @@ import java.lang.annotation.Target;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Properties;
 
 import static org.junit.Assert.assertThat;
 
 public class AbstractConfigTest {
 
-    @Test
+    //FIXME
+  /*  @Test
     public void testAppendProperties1() throws Exception {
         try {
             System.setProperty("dubbo.properties.i", "1");
@@ -98,7 +96,7 @@ public class AbstractConfigTest {
             System.clearProperty(Constants.DUBBO_PROPERTIES_KEY);
             ConfigUtils.setProperties(null);
         }
-    }
+    }*/
 
     @Test
     public void testAppendParameters1() throws Exception {
diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ReferenceBean.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ReferenceBean.java
index 4826478..6c4be77 100644
--- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ReferenceBean.java
+++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ReferenceBean.java
@@ -178,6 +178,9 @@ public class ReferenceBean<T> extends ReferenceConfig<T> implements FactoryBean,
                 }
             }
         }
+
+        checkAndUpdateSubConfigs();
+
         Boolean b = isInit();
         if (b == null && getConsumer() != null) {
             b = getConsumer().isInit();
diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ServiceBean.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ServiceBean.java
index a86ef26..6cd1509 100644
--- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ServiceBean.java
+++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/ServiceBean.java
@@ -270,6 +270,9 @@ public class ServiceBean<T> extends ServiceConfig<T> implements InitializingBean
                 setPath(beanName);
             }
         }
+
+        checkAndUpdateSubConfigs();
+
         if (!isDelay()) {
             export();
         }
diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandler.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandler.java
index 57701c6..8642d64 100644
--- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandler.java
+++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/schema/DubboNamespaceHandler.java
@@ -18,6 +18,7 @@ package org.apache.dubbo.config.spring.schema;
 
 import org.apache.dubbo.common.Version;
 import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.ConfigCenterConfig;
 import org.apache.dubbo.config.ConsumerConfig;
 import org.apache.dubbo.config.ModuleConfig;
 import org.apache.dubbo.config.MonitorConfig;
@@ -46,6 +47,7 @@ public class DubboNamespaceHandler extends NamespaceHandlerSupport {
         registerBeanDefinitionParser("module", new DubboBeanDefinitionParser(ModuleConfig.class, true));
         registerBeanDefinitionParser("registry", new DubboBeanDefinitionParser(RegistryConfig.class, true));
         registerBeanDefinitionParser("servicestore", new DubboBeanDefinitionParser(ServiceStoreConfig.class, true));
+        registerBeanDefinitionParser("configcenter", new DubboBeanDefinitionParser(ConfigCenterConfig.class, true));
         registerBeanDefinitionParser("monitor", new DubboBeanDefinitionParser(MonitorConfig.class, true));
         registerBeanDefinitionParser("provider", new DubboBeanDefinitionParser(ProviderConfig.class, true));
         registerBeanDefinitionParser("consumer", new DubboBeanDefinitionParser(ConsumerConfig.class, true));
diff --git a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
index 05e52af..3b89de6 100644
--- a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
+++ b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
@@ -593,6 +593,76 @@
         </xsd:attribute>
     </xsd:complexType>
 
+    <xsd:complexType name="configCenterType">
+        <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+            <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+        <xsd:attribute name="type" type="xsd:string" use="required">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The config center type. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="address" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The config center address. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="env" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation>
+                    <![CDATA[ The config center env, an simplify alternative for address. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="cluster" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The config center cluster. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="namespace" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation>
+                    <![CDATA[ The group of the config center, an isolated space for config items in the same config center. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="appnamespace" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The group of the config center. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="dataid" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The key used to get the configs at startup. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="username" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The username for AUTH. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="password" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The password for AUTH. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="timeout" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The request timeout. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="priority" type="xsd:boolean" use="optional">
+            <xsd:annotation>
+                <xsd:documentation>
+                    <![CDATA[ Whether the configs from config center has the highest priority. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="check" type="xsd:boolean" use="optional">
+            <xsd:annotation>
+                <xsd:documentation>
+                    <![CDATA[ The policy to apply when connecting to config center fails. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+    </xsd:complexType>
+
     <xsd:complexType name="monitorType">
         <xsd:sequence minOccurs="0" maxOccurs="unbounded">
             <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
diff --git a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
index 85d7189..9aa5db6 100644
--- a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
+++ b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
@@ -587,6 +587,76 @@
         </xsd:attribute>
     </xsd:complexType>
 
+    <xsd:complexType name="configCenterType">
+        <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+            <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+        <xsd:attribute name="type" type="xsd:string" use="required">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The config center type. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="address" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The config center address. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="env" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation>
+                    <![CDATA[ The config center env, an simplify alternative for address. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="cluster" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The config center cluster. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="namespace" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation>
+                    <![CDATA[ The group of the config center, an isolated space for config items in the same config center. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="appnamespace" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The group of the config center. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="dataid" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The key used to get the configs at startup. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="username" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The username for AUTH. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="password" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The password for AUTH. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="timeout" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The request timeout. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="priority" type="xsd:boolean" use="optional">
+            <xsd:annotation>
+                <xsd:documentation>
+                    <![CDATA[ Whether the configs from config center has the highest priority. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="check" type="xsd:boolean" use="optional">
+            <xsd:annotation>
+                <xsd:documentation>
+                    <![CDATA[ The policy to apply when connecting to config center fails. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+    </xsd:complexType>
+
     <xsd:complexType name="monitorType">
         <xsd:sequence minOccurs="0" maxOccurs="unbounded">
             <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
diff --git a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/AbstractDynamicConfiguration.java b/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/AbstractDynamicConfiguration.java
index 6769883..2de419b 100644
--- a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/AbstractDynamicConfiguration.java
+++ b/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/AbstractDynamicConfiguration.java
@@ -16,7 +16,9 @@
  */
 package org.apache.dubbo.governance;
 
+import org.apache.dubbo.common.Constants;
 import org.apache.dubbo.common.URL;
+import org.apache.dubbo.common.config.AbstractConfiguration;
 
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
@@ -24,7 +26,8 @@ import java.util.concurrent.ConcurrentMap;
 /**
  *
  */
-public abstract class AbstractDynamicConfiguration<TargetConfigListener> implements DynamicConfiguration {
+public abstract class AbstractDynamicConfiguration<TargetConfigListener> extends AbstractConfiguration implements DynamicConfiguration {
+    public static final String DEFAULT_NAMESPACE = "dubbo";
     protected URL url;
     /**
      * One key can register multiple target listeners, but one target listener only maps to one configuration listener
@@ -42,11 +45,21 @@ public abstract class AbstractDynamicConfiguration<TargetConfigListener> impleme
     }
 
     @Override
+    public String getConfig(String key) {
+        return getConfig(key, url.getParameter(Constants.CONFIG_NAMESPACE_KEY, DEFAULT_NAMESPACE), null);
+    }
+
+    @Override
     public String getConfig(String key, String group) {
         return getConfig(key, group, null);
     }
 
     @Override
+    public String getConfig(String key, ConfigurationListener listener) {
+        return getConfig(key, url.getParameter(Constants.CONFIG_NAMESPACE_KEY, DEFAULT_NAMESPACE), listener);
+    }
+
+    @Override
     public String getConfig(String key, String group, ConfigurationListener listener) {
         return getConfig(key, group, 0l, listener);
     }
diff --git a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/DynamicConfiguration.java b/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/DynamicConfiguration.java
index f07affe..924367f 100644
--- a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/DynamicConfiguration.java
+++ b/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/DynamicConfiguration.java
@@ -17,13 +17,14 @@
 package org.apache.dubbo.governance;
 
 import org.apache.dubbo.common.URL;
+import org.apache.dubbo.common.config.Configuration;
 import org.apache.dubbo.common.extension.SPI;
 
 /**
  *
  */
 @SPI("zookeeper")
-public interface DynamicConfiguration {
+public interface DynamicConfiguration extends Configuration {
 
     void init();
 
@@ -33,8 +34,12 @@ public interface DynamicConfiguration {
 
     void addListener(String key, ConfigurationListener listener);
 
+    String getConfig(String key);
+
     String getConfig(String key, String group);
 
+    String getConfig(String key, ConfigurationListener listener);
+
     String getConfig(String key, String group, long timeout, ConfigurationListener listener);
 
     String getConfig(String key, String group, ConfigurationListener listener);
diff --git a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/DynamicConfigurationFactory.java b/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/DynamicConfigurationFactory.java
index d4e8930..d986eae 100644
--- a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/DynamicConfigurationFactory.java
+++ b/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/DynamicConfigurationFactory.java
@@ -30,4 +30,6 @@ public interface DynamicConfigurationFactory {
     @Adaptive({Constants.CONFIG_TYPE_KEY})
     DynamicConfiguration getDynamicConfiguration(URL url);
 
+    DynamicConfiguration getExistedDynamicConfiguration();
+
 }
diff --git a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfiguration.java b/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfiguration.java
index e773a33..3f49e68 100644
--- a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfiguration.java
+++ b/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfiguration.java
@@ -20,7 +20,8 @@ import org.apache.dubbo.governance.AbstractDynamicConfiguration;
 import org.apache.dubbo.governance.ConfigurationListener;
 
 /**
- *
+ * The default extension of {@link org.apache.dubbo.governance.DynamicConfiguration}.
+ * If user does not specify a config centre, or specifies one that is not a valid extension, it will default to this one.
  */
 public class NopDynamicConfiguration extends AbstractDynamicConfiguration {
 
@@ -43,4 +44,9 @@ public class NopDynamicConfiguration extends AbstractDynamicConfiguration {
     protected Object createTargetConfigListener(String key, ConfigurationListener listener) {
         return null;
     }
+
+    @Override
+    protected Object getInternalProperty(String key) {
+        return null;
+    }
 }
diff --git a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfigurationFactory.java b/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfigurationFactory.java
index 62f2232..d423555 100644
--- a/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfigurationFactory.java
+++ b/dubbo-governance/dubbo-governance-api/src/main/java/org/apache/dubbo/governance/support/nop/NopDynamicConfigurationFactory.java
@@ -24,8 +24,17 @@ import org.apache.dubbo.governance.DynamicConfigurationFactory;
  *
  */
 public class NopDynamicConfigurationFactory implements DynamicConfigurationFactory {
+
+    private NopDynamicConfiguration dynamicConfiguration;
+
     @Override
     public DynamicConfiguration getDynamicConfiguration(URL url) {
-        return new NopDynamicConfiguration();
+        dynamicConfiguration = new NopDynamicConfiguration();
+        return dynamicConfiguration;
+    }
+
+    @Override
+    public DynamicConfiguration getExistedDynamicConfiguration() {
+        return dynamicConfiguration;
     }
 }
diff --git a/dubbo-governance/dubbo-governance-apollo/src/main/java/org/apache/dubbo/governance/support/apollo/ApolloDynamicConfiguration.java b/dubbo-governance/dubbo-governance-apollo/src/main/java/org/apache/dubbo/governance/support/apollo/ApolloDynamicConfiguration.java
index 70d8c5e..14db27b 100644
--- a/dubbo-governance/dubbo-governance-apollo/src/main/java/org/apache/dubbo/governance/support/apollo/ApolloDynamicConfiguration.java
+++ b/dubbo-governance/dubbo-governance-apollo/src/main/java/org/apache/dubbo/governance/support/apollo/ApolloDynamicConfiguration.java
@@ -86,11 +86,34 @@ public class ApolloDynamicConfiguration extends AbstractDynamicConfiguration<Con
         }
     }
 
+    /**
+     * This method will used by DynamicConfiguration,
+     * 1. to get configuration file at startup phase
+     * 2. to get all kinds of Dubbo rules
+     *
+     * @param key
+     * @param group
+     * @param timeout
+     * @return
+     */
     @Override
     protected String getInternalProperty(String key, String group, long timeout) {
         return dubboConfig.getProperty(key, null);
     }
 
+    /**
+     * This method will used by Configuration to get valid value at runtime.
+     * The group is expected to be 'app level', which can be fetched from the 'config.appnamespace' in url if necessary.
+     * But I think Apollo's inheritance feature of namespace can solve the problem, .
+     *
+     * @param key
+     * @return
+     */
+    @Override
+    protected String getInternalProperty(String key) {
+        return dubboConfig.getProperty(key, null);
+    }
+
     @Override
     protected void addTargetListener(String key, ConfigChangeListener listener) {
         Set<String> keys = new HashSet<>(1);
diff --git a/dubbo-governance/dubbo-governance-apollo/src/main/java/org/apache/dubbo/governance/support/apollo/ApolloDynamicConfigurationFactory.java b/dubbo-governance/dubbo-governance-apollo/src/main/java/org/apache/dubbo/governance/support/apollo/ApolloDynamicConfigurationFactory.java
index 5117a6f..5762f0b 100644
--- a/dubbo-governance/dubbo-governance-apollo/src/main/java/org/apache/dubbo/governance/support/apollo/ApolloDynamicConfigurationFactory.java
+++ b/dubbo-governance/dubbo-governance-apollo/src/main/java/org/apache/dubbo/governance/support/apollo/ApolloDynamicConfigurationFactory.java
@@ -36,4 +36,11 @@ public class ApolloDynamicConfigurationFactory implements DynamicConfigurationFa
         }
         return configuration;
     }
+
+    @Override
+    public DynamicConfiguration getExistedDynamicConfiguration() {
+        return configuration;
+    }
+
+
 }
diff --git a/dubbo-governance/dubbo-governance-zookeeper/src/main/java/org/apache/dubbo/governance/support/archaius/ArchaiusDynamicConfiguration.java b/dubbo-governance/dubbo-governance-zookeeper/src/main/java/org/apache/dubbo/governance/support/archaius/ArchaiusDynamicConfiguration.java
index 32b8f62..430a6ec 100644
--- a/dubbo-governance/dubbo-governance-zookeeper/src/main/java/org/apache/dubbo/governance/support/archaius/ArchaiusDynamicConfiguration.java
+++ b/dubbo-governance/dubbo-governance-zookeeper/src/main/java/org/apache/dubbo/governance/support/archaius/ArchaiusDynamicConfiguration.java
@@ -71,6 +71,13 @@ public class ArchaiusDynamicConfiguration extends AbstractDynamicConfiguration<R
     }
 
     @Override
+    protected Object getInternalProperty(String key) {
+        return DynamicPropertyFactory.getInstance()
+                .getStringProperty(key, null)
+                .get();
+    }
+
+    @Override
     protected void addTargetListener(String key, Runnable runnable) {
         DynamicStringProperty prop = DynamicPropertyFactory.getInstance()
                 .getStringProperty(key, null);
@@ -82,7 +89,6 @@ public class ArchaiusDynamicConfiguration extends AbstractDynamicConfiguration<R
         return new ArchaiusListener(key, listener);
     }
 
-
     private class ArchaiusListener implements Runnable {
         private ConfigurationListener listener;
         private URL url;
diff --git a/dubbo-governance/dubbo-governance-zookeeper/src/main/java/org/apache/dubbo/governance/support/archaius/ArchaiusDynamicConfigurationFactory.java b/dubbo-governance/dubbo-governance-zookeeper/src/main/java/org/apache/dubbo/governance/support/archaius/ArchaiusDynamicConfigurationFactory.java
index 6da335a..6bbf127 100644
--- a/dubbo-governance/dubbo-governance-zookeeper/src/main/java/org/apache/dubbo/governance/support/archaius/ArchaiusDynamicConfigurationFactory.java
+++ b/dubbo-governance/dubbo-governance-zookeeper/src/main/java/org/apache/dubbo/governance/support/archaius/ArchaiusDynamicConfigurationFactory.java
@@ -36,4 +36,9 @@ public class ArchaiusDynamicConfigurationFactory implements DynamicConfiguration
         }
         return configuration;
     }
+
+    @Override
+    public DynamicConfiguration getExistedDynamicConfiguration() {
+        return configuration;
+    }
 }
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
index 6c51eb7..4fcbd57 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java
@@ -191,7 +191,7 @@ public class RegistryDirectory<T> extends AbstractDirectory<T> implements Notify
         setConsumerUrl(url);
         String rawConfig = null;
         try {
-            rawConfig = dynamicConfiguration.getConfig(url.getServiceKey() + Constants.CONFIGURATORS_SUFFIX, "dubbo", this);
+            rawConfig = dynamicConfiguration.getConfig(url.getServiceKey() + Constants.CONFIGURATORS_SUFFIX, this);
             if (StringUtils.isNotEmpty(rawConfig)) {
                 this.dynamicConfigurators = configToConfiguratiors(rawConfig);
             }
@@ -201,7 +201,7 @@ public class RegistryDirectory<T> extends AbstractDirectory<T> implements Notify
 
         String rawConfigApp = null;
         try {
-            rawConfigApp = dynamicConfiguration.getConfig(url.getParameter(Constants.APPLICATION_KEY) + Constants.CONFIGURATORS_SUFFIX, "dubbo", this);
+            rawConfigApp = dynamicConfiguration.getConfig(url.getParameter(Constants.APPLICATION_KEY) + Constants.CONFIGURATORS_SUFFIX, this);
             if (StringUtils.isNotEmpty(rawConfigApp)) {
                 this.appDynamicConfigurators = configToConfiguratiors(rawConfigApp);
             }
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
index 7003a4c..b43031f 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java
@@ -51,6 +51,7 @@ import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -60,11 +61,9 @@ import static org.apache.dubbo.common.Constants.ACCEPT_FOREIGN_IP;
 import static org.apache.dubbo.common.Constants.ADD_PARAM_KEYS_KEY;
 import static org.apache.dubbo.common.Constants.APPLICATION_KEY;
 import static org.apache.dubbo.common.Constants.CONFIGURATORS_SUFFIX;
-import static org.apache.dubbo.common.Constants.CONFIG_PROTOCOL;
 import static org.apache.dubbo.common.Constants.EXCHANGING_KEYS;
 import static org.apache.dubbo.common.Constants.EXPORT_KEY;
 import static org.apache.dubbo.common.Constants.INTERFACES;
-import static org.apache.dubbo.common.Constants.INTERFACE_KEY;
 import static org.apache.dubbo.common.Constants.METHODS_KEY;
 import static org.apache.dubbo.common.Constants.QOS_ENABLE;
 import static org.apache.dubbo.common.Constants.QOS_PORT;
@@ -90,6 +89,7 @@ public class RegistryProtocol implements Protocol {
 
     public RegistryProtocol() {
         INSTANCE = this;
+        dynamicConfiguration = getDynamicConfiguration();
     }
 
     public static RegistryProtocol getRegistryProtocol() {
@@ -99,6 +99,16 @@ public class RegistryProtocol implements Protocol {
         return INSTANCE;
     }
 
+    public DynamicConfiguration getDynamicConfiguration() {
+        ExtensionLoader<DynamicConfigurationFactory> factoryLoader = ExtensionLoader.getExtensionLoader(DynamicConfigurationFactory.class);
+        Set<Object> factories = factoryLoader.getLoadedExtensionInstances();
+        if (CollectionUtils.isEmpty(factories)) {
+            return factoryLoader.getDefaultExtension().getDynamicConfiguration(null);
+        }
+
+        return ((DynamicConfigurationFactory) factories.iterator().next()).getExistedDynamicConfiguration();
+    }
+
     //Filter the parameters that do not need to be output in url(Starting with .)
     private static String[] getFilteredKeys(URL url) {
         Map<String, String> params = url.getParameters();
@@ -115,12 +125,6 @@ public class RegistryProtocol implements Protocol {
         }
     }
 
-    public void initDynamicConfiguration(URL url) {
-        if (dynamicConfiguration == null) {
-            dynamicConfiguration = ExtensionLoader.getExtensionLoader(DynamicConfigurationFactory.class).getAdaptiveExtension().getDynamicConfiguration(getConfigUrl(url));
-        }
-    }
-
     public void setCluster(Cluster cluster) {
         this.cluster = cluster;
     }
@@ -154,8 +158,6 @@ public class RegistryProtocol implements Protocol {
     @Override
     public <T> Exporter<T> export(final Invoker<T> originInvoker) throws RpcException {
         URL registryUrl = getRegistryUrl(originInvoker);
-        initDynamicConfiguration(registryUrl);
-
         // url to export locally
         URL providerUrl = getProviderUrl(originInvoker);
         providerUrl = overrideUrlWithConfig(providerUrl);
@@ -190,11 +192,11 @@ public class RegistryProtocol implements Protocol {
 
     private <T> URL overrideUrlWithConfig(URL providerUrl) {
         List<Configurator> dynamicConfigurators = new LinkedList<>();
-        String appRawConfig = dynamicConfiguration.getConfig(providerUrl.getParameter(Constants.APPLICATION_KEY) + Constants.CONFIGURATORS_SUFFIX, "dubbo");
+        String appRawConfig = dynamicConfiguration.getConfig(providerUrl.getParameter(Constants.APPLICATION_KEY) + Constants.CONFIGURATORS_SUFFIX);
         if (!StringUtils.isEmpty(appRawConfig)) {
             dynamicConfigurators.addAll(RegistryDirectory.configToConfiguratiors(appRawConfig));
         }
-        String rawConfig = dynamicConfiguration.getConfig(providerUrl.getServiceKey() + Constants.CONFIGURATORS_SUFFIX, "dubbo");
+        String rawConfig = dynamicConfiguration.getConfig(providerUrl.getServiceKey() + Constants.CONFIGURATORS_SUFFIX);
         if (!StringUtils.isEmpty(rawConfig)) {
             dynamicConfigurators.addAll(RegistryDirectory.configToConfiguratiors(rawConfig));
         }
@@ -202,36 +204,6 @@ public class RegistryProtocol implements Protocol {
         return providerUrl;
     }
 
-    /**
-     * generate a url contains configuration items for config center.
-     * if no configuration item found, use registry url instead.
-     *
-     * @param registryUrl
-     * @return
-     */
-    private URL getConfigUrl(URL registryUrl) {
-        Map<String, String> qs = StringUtils.parseQueryString(registryUrl.getParameterAndDecoded(REFER_KEY));
-        URL url = registryUrl
-                .removeParameters(EXPORT_KEY, REFER_KEY)
-                .setProtocol(CONFIG_PROTOCOL)
-                .setPath(qs.get(INTERFACE_KEY));
-        String configType = registryUrl.getParameter(Constants.CONFIG_TYPE_KEY);
-        if (StringUtils.isEmpty(configType)) {
-            url = url.addParameter(Constants.CONFIG_TYPE_KEY, registryUrl.getProtocol());
-        }
-
-        String configAddress = registryUrl.getParameter(Constants.CONFIG_ADDRESS_KEY);
-        if (StringUtils.isNotEmpty(configAddress)) {
-            url = url.setAddress(configAddress);
-        }
-
-        String configNamespace = registryUrl.getParameter(Constants.CONFIG_NAMESPACE_KEY);
-        if (StringUtils.isEmpty(configNamespace)) {
-            url = url.addParameter(Constants.CONFIG_NAMESPACE_KEY, registryUrl.getParameter(Constants.GROUP_KEY, Constants.DEFAULT_PROTOCOL));
-        }
-        return url;
-    }
-
     @SuppressWarnings("unchecked")
     private <T> ExporterChangeableWrapper<T> doLocalExport(final Invoker<T> originInvoker, URL providerUrl) {
         String key = getCacheKey(originInvoker);
@@ -350,7 +322,6 @@ public class RegistryProtocol implements Protocol {
     @SuppressWarnings("unchecked")
     public <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException {
         url = url.setProtocol(url.getParameter(Constants.REGISTRY_KEY, Constants.DEFAULT_REGISTRY)).removeParameter(Constants.REGISTRY_KEY);
-        initDynamicConfiguration(url);
         Registry registry = registryFactory.getRegistry(url);
         if (RegistryService.class.equals(type)) {
             return proxyFactory.getInvoker((T) registry, type, url);


[incubator-dubbo] 03/07: Merge branch 'master' into dev-metadata-config-mergemaster

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch dev-metadata
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git

commit 9af1f1a971a776ba6c4cad6fb09d6d7caf5d4f95
Merge: e125951 36a1155
Author: ken.lj <ke...@gmail.com>
AuthorDate: Tue Oct 30 14:36:32 2018 +0800

    Merge branch 'master' into dev-metadata-config-mergemaster
    
    # Conflicts:
    #	dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java
    #	dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/StaticDirectory.java
    #	dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mock/MockInvokersSelector.java
    #	dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/router/tag/TagRouterTest.java
    #	dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractConfig.java
    #	dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
    #	dubbo-dependencies-bom/pom.xml
    #	dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java

 .../ISSUE_TEMPLATE/dubbo-issue-report-template.md  |    4 +-
 .travis.yml                                        |    5 +-
 FAQ.md                                             |    6 +-
 NOTICE                                             |   11 +-
 README.md                                          |   21 +-
 dubbo-all/pom.xml                                  |   49 +-
 dubbo-bom/pom.xml                                  |    5 +
 .../rpc/cluster/directory/AbstractDirectory.java   |    1 +
 .../cluster/loadbalance/AbstractLoadBalance.java   |    6 +-
 .../loadbalance/LeastActiveLoadBalance.java        |   31 +-
 .../rpc/cluster/loadbalance/RandomLoadBalance.java |    8 +-
 .../cluster/loadbalance/RoundRobinLoadBalance.java |  164 ++-
 .../cluster/router/condition/ConditionRouter.java  |    9 +-
 .../cluster/router/mock/MockInvokersSelector.java  |    4 +-
 .../cluster/support/AbstractClusterInvoker.java    |   12 +-
 .../dubbo/rpc/cluster/support/ClusterUtils.java    |   14 +-
 .../org/apache/dubbo/rpc/cluster/StickyTest.java   |    4 +-
 .../loadbalance/LeastActiveBalanceTest.java        |   28 +-
 .../cluster/loadbalance/LoadBalanceBaseTest.java   |  131 ++-
 .../cluster/loadbalance/RandomLoadBalanceTest.java |   32 +-
 .../loadbalance/RoundRobinLoadBalanceTest.java     |  133 ++-
 .../support/AbstractClusterInvokerTest.java        |   18 +-
 .../java/org/apache/dubbo/common/Constants.java    |    2 +
 .../src/main/java/org/apache/dubbo/common/URL.java |  116 +-
 .../common/beanutil/JavaBeanSerializeUtil.java     |   18 +-
 .../dubbo/common/bytecode/ClassGenerator.java      |  722 ++++++------
 .../org/apache/dubbo/common/bytecode/Mixin.java    |   41 +-
 .../org/apache/dubbo/common/bytecode/Proxy.java    |   62 +-
 .../org/apache/dubbo/common/bytecode/Wrapper.java  |   90 +-
 .../dubbo/common/compiler/support/JdkCompiler.java |    6 +-
 .../dubbo/common/extension/ExtensionLoader.java    |   72 +-
 .../java/org/apache/dubbo/common/io/Bytes.java     |  123 +-
 .../org/apache/dubbo/common/io/StreamUtils.java    |   29 +-
 .../common/io/UnsafeByteArrayInputStream.java      |   21 +-
 .../common/io/UnsafeByteArrayOutputStream.java     |   15 +-
 .../apache/dubbo/common/io/UnsafeStringReader.java |   21 +-
 .../apache/dubbo/common/io/UnsafeStringWriter.java |   14 +-
 .../dubbo/common/json/GenericJSONConverter.java    |  108 +-
 .../org/apache/dubbo/common/json/J2oVisitor.java   |   77 +-
 .../java/org/apache/dubbo/common/json/JSON.java    |   28 +-
 .../org/apache/dubbo/common/json/JSONArray.java    |    8 +-
 .../org/apache/dubbo/common/json/JSONObject.java   |   11 +-
 .../org/apache/dubbo/common/json/JSONReader.java   |    6 +-
 .../org/apache/dubbo/common/json/JSONWriter.java   |   15 +-
 .../java/org/apache/dubbo/common/json/Yylex.java   |   30 +-
 .../dubbo/common/logger/jdk/JdkLoggerAdapter.java  |   36 +-
 .../common/logger/log4j/Log4jLoggerAdapter.java    |   36 +-
 .../common/status/support/LoadStatusChecker.java   |    5 +
 .../common/store/support/SimpleDataStore.java      |    4 +-
 .../dubbo/common/utils/AtomicPositiveInteger.java  |    8 +-
 .../org/apache/dubbo/common/utils/ClassHelper.java |   16 +-
 .../apache/dubbo/common/utils/CollectionUtils.java |    4 +-
 .../dubbo/common/utils/CompatibleTypeUtils.java    |   13 +-
 .../org/apache/dubbo/common/utils/ConfigUtils.java |    5 +-
 .../org/apache/dubbo/common/utils/IOUtils.java     |   15 +-
 .../java/org/apache/dubbo/common/utils/Log.java    |   44 +-
 .../org/apache/dubbo/common/utils/LogUtil.java     |   23 +-
 .../org/apache/dubbo/common/utils/NetUtils.java    |    9 +-
 .../org/apache/dubbo/common/utils/PojoUtils.java   |    6 +-
 .../apache/dubbo/common/utils/ReflectUtils.java    |  258 +++--
 .../java/org/apache/dubbo/common/utils/Stack.java  |   20 +-
 .../org/apache/dubbo/common/utils/StringUtils.java |   75 +-
 .../org/apache/dubbo/common/utils/UrlUtils.java    |   12 +-
 .../common/compiler/support/JavaCodeTest.java      |    6 +-
 .../compiler/support/JavassistCompilerTest.java    |    4 +-
 .../common/compiler/support/JdkCompilerTest.java   |    4 +-
 .../org/apache/dubbo/common/model/AnimalEnum.java  |   21 -
 .../model/BizExceptionNoDefaultConstructor.java    |   26 -
 .../dubbo/common/model/media/MediaContent.java     |   78 --
 .../common/utils/CompatibleTypeUtilsTest.java      |    9 +
 .../apache/dubbo/common/utils/PojoUtilsTest.java   |   30 +
 .../apache/dubbo/common/utils/UrlUtilsTest.java    |   18 +-
 .../main/java/com/alibaba/dubbo/common/URL.java    |   12 +-
 .../org/apache/dubbo/config/MethodConfigTest.java  |   27 +-
 .../apache/dubbo/generic/GenericServiceTest.java   |    2 +-
 .../org/apache/dubbo/config/AbstractConfig.java    |   58 +-
 .../org/apache/dubbo/config/ReferenceConfig.java   |   73 +-
 .../org/apache/dubbo/config/RegistryConfig.java    |    3 +-
 .../org/apache/dubbo/config/ServiceConfig.java     |    8 +-
 .../dubbo/config/model/ApplicationModel.java       |   94 --
 .../dubbo/config/model/ConsumerMethodModel.java    |   86 --
 .../dubbo/config/utils/ReferenceConfigCache.java   |    4 +-
 .../apache/dubbo/config/AbstractConfigTest.java    |    4 +-
 .../apache/dubbo/config/GenericServiceTest.java    |   10 +-
 .../org/apache/dubbo/config/MethodConfigTest.java  |   12 +-
 .../org/apache/dubbo/config/cache/CacheTest.java   |    4 +-
 .../apache/dubbo/config/spring/ReferenceBean.java  |   20 +-
 .../apache/dubbo/config/spring/ServiceBean.java    |   35 +-
 .../DubboConfigBindingBeanPostProcessor.java       |    2 +-
 .../ReferenceAnnotationBeanPostProcessor.java      |  107 +-
 .../spring/extension/SpringExtensionFactory.java   |    4 +
 .../spring/initializer/DubboContextListener.java   |   72 ++
 .../spring/status/DataSourceStatusChecker.java     |   12 +-
 .../config/spring/status/SpringStatusChecker.java  |   12 +-
 .../src/main/resources/META-INF/compat/dubbo.xsd   |    4 +-
 .../src/main/resources/META-INF/dubbo.xsd          |    2 +-
 .../src/main/resources/META-INF/web-fragment.xml   |    6 +-
 .../org/apache/dubbo/config/spring/ConfigTest.java |    6 +-
 .../ReferenceAnnotationBeanPostProcessorTest.java  |   84 +-
 .../DubboApplicationContextInitializerTest.java    |   15 +-
 .../spring/status/DataSourceStatusCheckerTest.java |   11 +-
 .../spring/status/SpringStatusCheckerTest.java     |   13 +-
 .../dubbo/config/spring/annotation-consumer.xml    |    2 +-
 .../dubbo/config/spring/delay-fixed-time.xml       |    2 +-
 .../dubbo/config/spring/delay-on-initialized.xml   |    2 +-
 .../config/spring/override-multi-protocol.xml      |    5 +-
 .../apache/dubbo/config/spring/provider-multi.xml  |    3 +-
 dubbo-dependencies-bom/pom.xml                     |   15 +-
 dubbo-distribution/pom.xml                         |    7 +-
 .../org/apache/dubbo/cache/filter/CacheFilter.java |   26 +-
 .../apache/dubbo/cache/filter/CacheFilterTest.java |    4 +-
 .../validation/support/jvalidation/JValidator.java |   23 +-
 .../java/org/apache/dubbo/metrics/MetricName.java  |   66 +-
 .../org/apache/dubbo/monitor/dubbo/Statistics.java |   51 +-
 .../apache/dubbo/qos/command/CommandContext.java   |    3 +-
 .../java/org/apache/dubbo/qos/command/impl/Ls.java |    6 +-
 .../org/apache/dubbo/qos/command/impl/Offline.java |    8 +-
 .../org/apache/dubbo/qos/command/impl/Online.java  |    8 +-
 .../org/apache/dubbo/qos/command/impl/LsTest.java  |    6 +-
 .../apache/dubbo/qos/command/impl/OfflineTest.java |    4 +-
 .../apache/dubbo/qos/command/impl/OnlineTest.java  |    4 +-
 .../registry/integration/RegistryDirectory.java    |    6 +-
 .../dubbo/registry/support/AbstractRegistry.java   |    4 +-
 .../registry/support/AbstractRegistryFactory.java  |    6 +-
 .../support/AbstractRegistryFactoryTest.java       |   17 +-
 .../registry/support/AbstractRegistryTest.java     |   64 +-
 .../apache/dubbo/registry/dubbo/DubboRegistry.java |    3 +-
 .../apache/dubbo/registry/redis/RedisRegistry.java |   24 +-
 .../registry/zookeeper/ZookeeperRegistry.java      |    4 +-
 .../apache/dubbo/remoting/exchange/Request.java    |    4 +-
 .../remoting/exchange/codec/ExchangeCodec.java     |   40 +-
 .../support/header/HeaderExchangeChannel.java      |   20 +-
 .../support/header/HeaderExchangeHandler.java      |   10 +-
 .../support/header/HeaderExchangeServer.java       |    3 +-
 .../dubbo/remoting/transport/AbstractClient.java   |   23 +-
 .../dubbo/remoting/transport/CodecSupport.java     |    6 +
 .../transport/dispatcher/ChannelEventRunnable.java |    1 +
 .../dubbo/remoting/codec/ExchangeCodecTest.java    |   18 +
 .../transport/codec/DeprecatedExchangeCodec.java   |   18 +-
 .../remoting/transport/grizzly/GrizzlyChannel.java |   20 +-
 .../remoting/transport/grizzly/GrizzlyClient.java  |    5 +-
 .../dubbo/remoting/transport/mina/MinaChannel.java |   20 +-
 .../dubbo/remoting/transport/mina/MinaClient.java  |    9 +-
 .../remoting/transport/mina/MinaCodecAdapter.java  |    4 +-
 .../transport/mina/MinaClientToServerTest.java     |    2 +-
 .../remoting/transport/netty/NettyChannel.java     |   20 +-
 .../remoting/transport/netty/NettyClient.java      |    5 +-
 .../transport/netty/ClientReconnectTest.java       |    2 +-
 .../transport/netty/NettyClientToServerTest.java   |    2 +-
 .../remoting/transport/netty4/NettyChannel.java    |   20 +-
 .../remoting/transport/netty4/NettyClient.java     |    9 +-
 .../transport/netty4/NettyClientToServerTest.java  |    2 +-
 .../java/org/apache/dubbo/rpc/AsyncRpcResult.java  |    5 +-
 .../main/java/org/apache/dubbo/rpc/RpcContext.java |   25 +
 .../org/apache/dubbo/rpc/ServiceClassHolder.java   |   45 -
 .../java/org/apache/dubbo/rpc/StaticContext.java   |   75 --
 .../org/apache/dubbo/rpc/filter/EchoFilter.java    |    3 +-
 .../apache/dubbo/rpc/model/ApplicationModel.java   |   75 ++
 .../dubbo/rpc/model/ConsumerMethodModel.java       |  160 +++
 .../org/apache/dubbo/rpc}/model/ConsumerModel.java |   38 +-
 .../dubbo/rpc}/model/ProviderMethodModel.java      |    2 +-
 .../org/apache/dubbo/rpc}/model/ProviderModel.java |   19 +-
 .../dubbo/rpc/protocol/AbstractExporter.java       |    9 +-
 .../apache/dubbo/rpc/protocol/AbstractInvoker.java |   12 +-
 .../apache/dubbo/rpc/support/DelegateExporter.java |   47 -
 .../org/apache/dubbo/rpc/support/RpcUtils.java     |    8 +-
 .../org/apache/dubbo/rpc/StaticContextTest.java    |   64 --
 .../rpc/protocol/dubbo/DecodeableRpcResult.java    |    6 +-
 .../dubbo/rpc/protocol/dubbo/DubboCodec.java       |   41 +-
 .../dubbo/rpc/protocol/dubbo/DubboInvoker.java     |    3 +-
 .../dubbo/rpc/protocol/dubbo/DubboProtocol.java    |    6 +-
 .../protocol/dubbo/LazyConnectExchangeClient.java  |   17 +-
 .../rpc/protocol/dubbo/filter/FutureFilter.java    |   48 +-
 .../rpc/protocol/dubbo/DubboProtocolTest.java      |   24 +-
 .../rpc/protocol/dubbo/ExplicitCallbackTest.java   |    5 +-
 .../rpc/protocol/dubbo/ImplicitCallBackTest.java   |   75 +-
 .../dubbo/telnet/ChangeTelnetHandlerTest.java      |    2 +-
 .../dubbo/telnet/InvokerTelnetHandlerTest.java     |   12 +-
 .../dubbo/telnet/ListTelnetHandlerTest.java        |    8 +-
 .../dubbo/telnet/PortTelnetHandlerTest.java        |   12 +-
 .../dubbo/rpc/protocol/redis/RedisProtocol.java    |   24 +-
 .../dubbo/rpc/protocol/rest/RestProtocol.java      |    6 +-
 .../dubbo/rpc/protocol/rest/RestProtocolTest.java  |   50 +-
 .../dubbo/rpc/protol/rest/RestProtocolTest.java    |   23 +-
 .../dubbo/rpc/protocol/thrift/ThriftProtocol.java  |    3 +-
 .../io/RandomAccessByteArrayOutputStream.java      |   15 +-
 .../webservice/WebserviceProtocolTest.java         |    4 +-
 .../dubbo-serialization-api/pom.xml                |    2 +-
 .../dubbo-serialization-fastjson/pom.xml           |    2 +-
 .../serialize/fastjson/FastJsonObjectInput.java    |    5 +-
 .../common/serialize/fastjson/model/Image.java     |  104 --
 .../common/serialize/fastjson/model/Person.java    |   38 -
 .../src/test/resources/log4j.xml                   |   32 -
 .../dubbo-serialization-fst/pom.xml                |    2 +-
 .../common/serialize/fst/model/AnimalEnum.java     |   21 -
 .../common/serialize/fst/model/FullAddress.java    |  199 ----
 .../src/test/resources/log4j.xml                   |   32 -
 .../dubbo-serialization-hessian2/pom.xml           |    2 +-
 .../org/apache/dubbo/common/model/AnimalEnum.java  |   21 -
 .../apache/dubbo/common/model/BizException.java    |   29 -
 .../model/BizExceptionNoDefaultConstructor.java    |   26 -
 .../java/org/apache/dubbo/common/model/Person.java |   95 --
 .../dubbo/common/model/SerializablePerson.java     |   97 --
 .../org/apache/dubbo/common/model/media/Image.java |  120 --
 .../org/apache/dubbo/common/model/media/Media.java |  205 ----
 .../dubbo/common/model/media/MediaContent.java     |   78 --
 .../dubbo/common/model/person/BigPerson.java       |  151 ---
 .../dubbo/common/model/person/FullAddress.java     |  202 ----
 .../dubbo/common/model/person/PersonInfo.java      |  206 ----
 .../apache/dubbo/common/model/person/Phone.java    |  139 ---
 .../src/test/resources/log4j.xml                   |   32 -
 .../dubbo/common/serialize/dubbo/SimpleDO.fc       |    2 -
 .../dubbo-serialization-jdk/pom.xml                |    2 +-
 .../serialize/java/CompactedObjectInputStream.java |    3 +-
 .../common/serialize/java/JavaObjectInput.java     |   15 +-
 .../java/org/apache/dubbo/common/model/Person.java |   95 --
 .../dubbo/common/model/SerializablePerson.java     |   97 --
 .../org/apache/dubbo/common/model/media/Image.java |  120 --
 .../dubbo/common/model/person/BigPerson.java       |  151 ---
 .../dubbo/common/model/person/PersonInfo.java      |  206 ----
 .../dubbo/common/model/person/PersonStatus.java    |   22 -
 .../apache/dubbo/common/model/person/Phone.java    |  139 ---
 .../AbstractSerializationPersionFailTest.java      |  137 ---
 .../AbstractSerializationPersionOkTest.java        |   93 --
 .../serialization/AbstractSerializationTest.java   | 1210 -------------------
 .../src/test/resources/log4j.xml                   |   32 -
 .../dubbo/common/serialize/dubbo/SimpleDO.fc       |    2 -
 .../dubbo-serialization-kryo/pom.xml               |    2 +-
 .../org/apache/dubbo/common/model/AnimalEnum.java  |   21 -
 .../apache/dubbo/common/model/BizException.java    |   29 -
 .../model/BizExceptionNoDefaultConstructor.java    |   26 -
 .../org/apache/dubbo/common/model/media/Media.java |  205 ----
 .../dubbo/common/model/media/MediaContent.java     |   78 --
 .../dubbo/common/model/person/FullAddress.java     |  202 ----
 .../dubbo/common/model/person/PersonStatus.java    |   22 -
 .../AbstractSerializationPersionFailTest.java      |  137 ---
 .../AbstractSerializationPersionOkTest.java        |   93 --
 .../serialization/AbstractSerializationTest.java   | 1215 --------------------
 .../src/test/resources/log4j.xml                   |   32 -
 .../pom.xml                                        |   28 +-
 .../protostuff/ProtostuffObjectInput.java          |  134 +++
 .../protostuff/ProtostuffObjectOutput.java         |  128 +++
 .../protostuff/ProtostuffSerialization.java        |  110 +-
 .../dubbo/common/serialize/protostuff/Wrapper.java |   62 +-
 .../protostuff/delegate/TimeDelegate.java          |   54 +
 .../serialize/protostuff/utils/WrapperUtils.java   |   92 ++
 ...org.apache.dubbo.common.serialize.Serialization |    1 +
 .../dubbo-serialization-test/pom.xml               |   73 ++
 .../base/AbstractSerializationPersonFailTest.java} |   25 +-
 .../base/AbstractSerializationPersonOkTest.java}   |   41 +-
 .../serialize/base}/AbstractSerializationTest.java |   50 +-
 .../fastjson/FastJsonObjectInputTest.java          |    2 +-
 .../fastjson/FastJsonObjectOutputTest.java         |    6 +-
 .../fastjson/FastJsonSerializationTest.java        |    3 -
 .../dubbo/common/serialize/fst/FstFactoryTest.java |    0
 .../common/serialize/fst/FstObjectInputTest.java   |    5 +-
 .../common/serialize/fst/FstObjectOutputTest.java  |    6 +-
 .../common/serialize/fst/FstSerializationTest.java |    0
 .../serialize/hessian2/Hessian2PersonOkTest.java}  |   17 +-
 .../hessian2}/Hessian2SerializationTest.java       |    7 +-
 .../jdk}/CompactedJavaSerializationTest.java       |    5 +-
 .../serialize/jdk}/JavaSerializationTest.java      |    5 +-
 .../common/serialize/jdk/JdkPersonOkTest.java}     |   12 +-
 .../jdk}/NativeJavaSerializationTest.java          |    5 +-
 .../common/serialize/kryo/KryoPersonOkTest.java}   |   11 +-
 .../serialize/kryo}/KyroSerializationTest.java     |    4 +-
 .../serialize/kryo}/ReflectionUtilsTest.java       |    3 +-
 .../dubbo/common/serialize}/model/AnimalEnum.java  |    2 +-
 .../common/serialize}/model/BizException.java      |    2 +-
 .../model/BizExceptionNoDefaultConstructor.java    |    2 +-
 .../dubbo/common/serialize}/model/Person.java      |    2 +-
 .../serialize}/model/SerializablePerson.java       |    2 +-
 .../dubbo/common/serialize}/model/media/Image.java |    2 +-
 .../dubbo/common/serialize}/model/media/Media.java |    2 +-
 .../serialize}/model/media/MediaContent.java       |    2 +-
 .../common/serialize}/model/person/BigPerson.java  |    2 +-
 .../serialize}/model/person/FullAddress.java       |    2 +-
 .../common/serialize}/model/person/PersonInfo.java |    2 +-
 .../serialize}/model/person/PersonStatus.java      |    2 +-
 .../common/serialize}/model/person/Phone.java      |    2 +-
 .../protostuff/ProtostuffSerializationTest.java    |   21 +-
 .../support/SerializableClassRegistryTest.java     |   13 +-
 .../src/test/resources/log4j.xml                   |   58 +-
 .../SimpleDO.fc                                    |    0
 dubbo-serialization/pom.xml                        |    4 +-
 pom.xml                                            |    8 +-
 286 files changed, 4269 insertions(+), 8503 deletions(-)

diff --cc dubbo-all/pom.xml
index f4ce3e9,8e8fa66..e7ac32e
--- a/dubbo-all/pom.xml
+++ b/dubbo-all/pom.xml
@@@ -452,10 -438,8 +459,11 @@@
                                      <include>org.apache.dubbo:dubbo-serialization-fst</include>
                                      <include>org.apache.dubbo:dubbo-serialization-kryo</include>
                                      <include>org.apache.dubbo:dubbo-serialization-jdk</include>
+                                     <include>org.apache.dubbo:dubbo-serialization-protostuff</include>
                                      <include>org.apache.dubbo:dubbo-bootstrap</include>
 +                                    <include>org.apache.dubbo:dubbo-governance-api</include>
 +                                    <include>org.apache.dubbo:dubbo-governance-apollo</include>
 +                                    <include>org.apache.dubbo:dubbo-governance-zookeeper</include>
                                  </includes>
                              </artifactSet>
                              <transformers>
diff --cc dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java
index 1f51999,0cea0b8..e77ac49
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java
@@@ -50,16 -54,17 +50,17 @@@ public abstract class AbstractDirectory
          this(url, null);
      }
  
 -    public AbstractDirectory(URL url, List<Router> routers) {
 -        this(url, url, routers);
 +    public AbstractDirectory(URL url, RouterChain<T> routerChain) {
 +        this(url, url, routerChain);
      }
  
 -    public AbstractDirectory(URL url, URL consumerUrl, List<Router> routers) {
 -        if (url == null) {
 +    public AbstractDirectory(URL url, URL consumerUrl, RouterChain<T> routerChain) {
 +        if (url == null)
              throw new IllegalArgumentException("url == null");
+         }
          this.url = url;
          this.consumerUrl = consumerUrl;
 -        setRouters(routers);
 +        setRouterChain(routerChain);
      }
  
      @Override
diff --cc dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mock/MockInvokersSelector.java
index 66f9ccb,35ce7e5..a479136
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mock/MockInvokersSelector.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mock/MockInvokersSelector.java
@@@ -1,109 -1,100 +1,109 @@@
 -/*
 - * Licensed to the Apache Software Foundation (ASF) under one or more
 - * contributor license agreements.  See the NOTICE file distributed with
 - * this work for additional information regarding copyright ownership.
 - * The ASF licenses this file to You under the Apache License, Version 2.0
 - * (the "License"); you may not use this file except in compliance with
 - * the License.  You may obtain a copy of the License at
 - *
 - *     http://www.apache.org/licenses/LICENSE-2.0
 - *
 - * Unless required by applicable law or agreed to in writing, software
 - * distributed under the License is distributed on an "AS IS" BASIS,
 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 - * See the License for the specific language governing permissions and
 - * limitations under the License.
 - */
 -package org.apache.dubbo.rpc.cluster.router;
 -
 -import org.apache.dubbo.common.Constants;
 -import org.apache.dubbo.common.URL;
 -import org.apache.dubbo.rpc.Invocation;
 -import org.apache.dubbo.rpc.Invoker;
 -import org.apache.dubbo.rpc.RpcException;
 -import org.apache.dubbo.rpc.cluster.Router;
 -
 -import java.util.ArrayList;
 -import java.util.List;
 -
 -/**
 - * A specific Router designed to realize mock feature.
 - * If a request is configured to use mock, then this router guarantees that only the invokers with protocol MOCK appear in final the invoker list, all other invokers will be excluded.
 - *
 - */
 -public class MockInvokersSelector implements Router {
 -
 -    @Override
 -    public <T> List<Invoker<T>> route(final List<Invoker<T>> invokers,
 -                                      URL url, final Invocation invocation) throws RpcException {
 -        if (invocation.getAttachments() == null) {
 -            return getNormalInvokers(invokers);
 -        } else {
 -            String value = invocation.getAttachments().get(Constants.INVOCATION_NEED_MOCK);
 -            if (value == null) {
 -                return getNormalInvokers(invokers);
 -            } else if (Boolean.TRUE.toString().equalsIgnoreCase(value)) {
 -                return getMockedInvokers(invokers);
 -            }
 -        }
 -        return invokers;
 -    }
 -
 -    private <T> List<Invoker<T>> getMockedInvokers(final List<Invoker<T>> invokers) {
 -        if (!hasMockProviders(invokers)) {
 -            return null;
 -        }
 -        List<Invoker<T>> sInvokers = new ArrayList<Invoker<T>>(1);
 -        for (Invoker<T> invoker : invokers) {
 -            if (invoker.getUrl().getProtocol().equals(Constants.MOCK_PROTOCOL)) {
 -                sInvokers.add(invoker);
 -            }
 -        }
 -        return sInvokers;
 -    }
 -
 -    private <T> List<Invoker<T>> getNormalInvokers(final List<Invoker<T>> invokers) {
 -        if (!hasMockProviders(invokers)) {
 -            return invokers;
 -        } else {
 -            List<Invoker<T>> sInvokers = new ArrayList<Invoker<T>>(invokers.size());
 -            for (Invoker<T> invoker : invokers) {
 -                if (!invoker.getUrl().getProtocol().equals(Constants.MOCK_PROTOCOL)) {
 -                    sInvokers.add(invoker);
 -                }
 -            }
 -            return sInvokers;
 -        }
 -    }
 -
 -    private <T> boolean hasMockProviders(final List<Invoker<T>> invokers) {
 -        boolean hasMockProvider = false;
 -        for (Invoker<T> invoker : invokers) {
 -            if (invoker.getUrl().getProtocol().equals(Constants.MOCK_PROTOCOL)) {
 -                hasMockProvider = true;
 -                break;
 -            }
 -        }
 -        return hasMockProvider;
 -    }
 -
 -    @Override
 -    public URL getUrl() {
 -        return null;
 -    }
 -
 -    @Override
 -    public int compareTo(Router o) {
 -        return 1;
 -    }
 -
 -}
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.dubbo.rpc.cluster.router.mock;
 +
 +import org.apache.dubbo.common.Constants;
 +import org.apache.dubbo.common.URL;
 +import org.apache.dubbo.rpc.Invocation;
 +import org.apache.dubbo.rpc.Invoker;
 +import org.apache.dubbo.rpc.RpcException;
 +import org.apache.dubbo.rpc.cluster.Router;
 +import org.apache.dubbo.rpc.cluster.router.AbstractRouter;
 +
 +import java.util.ArrayList;
 +import java.util.List;
 +
 +/**
 + * A specific Router designed to realize mock feature.
 + * If a request is configured to use mock, then this router guarantees that only the invokers with protocol MOCK appear in final the invoker list, all other invokers will be excluded.
 + *
 + */
 +public class MockInvokersSelector extends AbstractRouter {
 +
 +    public static final String NAME = "MOCK_ROUTER";
 +
 +    @Override
 +    public <T> List<Invoker<T>> route(final List<Invoker<T>> invokers,
 +                                      URL url, final Invocation invocation) throws RpcException {
 +        if (invocation.getAttachments() == null) {
 +            return getNormalInvokers(invokers);
 +        } else {
 +            String value = invocation.getAttachments().get(Constants.INVOCATION_NEED_MOCK);
-             if (value == null)
++            if (value == null) {
 +                return getNormalInvokers(invokers);
-             else if (Boolean.TRUE.toString().equalsIgnoreCase(value)) {
++            } else if (Boolean.TRUE.toString().equalsIgnoreCase(value)) {
 +                return getMockedInvokers(invokers);
 +            }
 +        }
 +        return invokers;
 +    }
 +
 +    private <T> List<Invoker<T>> getMockedInvokers(final List<Invoker<T>> invokers) {
 +        if (!hasMockProviders(invokers)) {
 +            return null;
 +        }
 +        List<Invoker<T>> sInvokers = new ArrayList<Invoker<T>>(1);
 +        for (Invoker<T> invoker : invokers) {
 +            if (invoker.getUrl().getProtocol().equals(Constants.MOCK_PROTOCOL)) {
 +                sInvokers.add(invoker);
 +            }
 +        }
 +        return sInvokers;
 +    }
 +
 +    private <T> List<Invoker<T>> getNormalInvokers(final List<Invoker<T>> invokers) {
 +        if (!hasMockProviders(invokers)) {
 +            return invokers;
 +        } else {
 +            List<Invoker<T>> sInvokers = new ArrayList<Invoker<T>>(invokers.size());
 +            for (Invoker<T> invoker : invokers) {
 +                if (!invoker.getUrl().getProtocol().equals(Constants.MOCK_PROTOCOL)) {
 +                    sInvokers.add(invoker);
 +                }
 +            }
 +            return sInvokers;
 +        }
 +    }
 +
 +    private <T> boolean hasMockProviders(final List<Invoker<T>> invokers) {
 +        boolean hasMockProvider = false;
 +        for (Invoker<T> invoker : invokers) {
 +            if (invoker.getUrl().getProtocol().equals(Constants.MOCK_PROTOCOL)) {
 +                hasMockProvider = true;
 +                break;
 +            }
 +        }
 +        return hasMockProvider;
 +    }
 +
 +    @Override
 +    public String getName() {
 +        return NAME;
 +    }
 +
 +    /**
 +     * Always stay on the top of the list
 +     *
 +     * @param o
 +     * @return
 +     */
 +    @Override
 +    public int compareTo(Router o) {
 +        return 1;
 +    }
 +
 +}
diff --cc dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractConfig.java
index be98ae4,fdaa3b1..ff74233
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractConfig.java
@@@ -1,579 -1,534 +1,627 @@@
 -/*
 - * Licensed to the Apache Software Foundation (ASF) under one or more
 - * contributor license agreements.  See the NOTICE file distributed with
 - * this work for additional information regarding copyright ownership.
 - * The ASF licenses this file to You under the Apache License, Version 2.0
 - * (the "License"); you may not use this file except in compliance with
 - * the License.  You may obtain a copy of the License at
 - *
 - *     http://www.apache.org/licenses/LICENSE-2.0
 - *
 - * Unless required by applicable law or agreed to in writing, software
 - * distributed under the License is distributed on an "AS IS" BASIS,
 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 - * See the License for the specific language governing permissions and
 - * limitations under the License.
 - */
 -package org.apache.dubbo.config;
 -
 -import org.apache.dubbo.common.Constants;
 -import org.apache.dubbo.common.URL;
 -import org.apache.dubbo.common.extension.ExtensionLoader;
 -import org.apache.dubbo.common.logger.Logger;
 -import org.apache.dubbo.common.logger.LoggerFactory;
 -import org.apache.dubbo.common.utils.CollectionUtils;
 -import org.apache.dubbo.common.utils.ConfigUtils;
 -import org.apache.dubbo.common.utils.ReflectUtils;
 -import org.apache.dubbo.common.utils.StringUtils;
 -import org.apache.dubbo.config.support.Parameter;
 -import org.apache.dubbo.rpc.model.ConsumerMethodModel;
 -
 -import java.io.Serializable;
 -import java.lang.reflect.Method;
 -import java.lang.reflect.Modifier;
 -import java.util.HashMap;
 -import java.util.Map;
 -import java.util.regex.Matcher;
 -import java.util.regex.Pattern;
 -
 -/**
 - * Utility methods and public methods for parsing configuration
 - *
 - * @export
 - */
 -public abstract class AbstractConfig implements Serializable {
 -
 -    protected static final Logger logger = LoggerFactory.getLogger(AbstractConfig.class);
 -    private static final long serialVersionUID = 4267533505537413570L;
 -    private static final int MAX_LENGTH = 200;
 -
 -    private static final int MAX_PATH_LENGTH = 200;
 -
 -    private static final Pattern PATTERN_NAME = Pattern.compile("[\\-._0-9a-zA-Z]+");
 -
 -    private static final Pattern PATTERN_MULTI_NAME = Pattern.compile("[,\\-._0-9a-zA-Z]+");
 -
 -    private static final Pattern PATTERN_METHOD_NAME = Pattern.compile("[a-zA-Z][0-9a-zA-Z]*");
 -
 -    private static final Pattern PATTERN_PATH = Pattern.compile("[/\\-$._0-9a-zA-Z]+");
 -
 -    private static final Pattern PATTERN_NAME_HAS_SYMBOL = Pattern.compile("[:*,/\\-._0-9a-zA-Z]+");
 -
 -    private static final Pattern PATTERN_KEY = Pattern.compile("[*,\\-._0-9a-zA-Z]+");
 -    private static final Map<String, String> legacyProperties = new HashMap<String, String>();
 -    private static final String[] SUFFIXES = new String[]{"Config", "Bean"};
 -
 -    static {
 -        legacyProperties.put("dubbo.protocol.name", "dubbo.service.protocol");
 -        legacyProperties.put("dubbo.protocol.host", "dubbo.service.server.host");
 -        legacyProperties.put("dubbo.protocol.port", "dubbo.service.server.port");
 -        legacyProperties.put("dubbo.protocol.threads", "dubbo.service.max.thread.pool.size");
 -        legacyProperties.put("dubbo.consumer.timeout", "dubbo.service.invoke.timeout");
 -        legacyProperties.put("dubbo.consumer.retries", "dubbo.service.max.retry.providers");
 -        legacyProperties.put("dubbo.consumer.check", "dubbo.service.allow.no.provider");
 -        legacyProperties.put("dubbo.service.url", "dubbo.service.address");
 -
 -        // this is only for compatibility
 -        Runtime.getRuntime().addShutdownHook(DubboShutdownHook.getDubboShutdownHook());
 -    }
 -
 -    protected String id;
 -
 -    private static String convertLegacyValue(String key, String value) {
 -        if (value != null && value.length() > 0) {
 -            if ("dubbo.service.max.retry.providers".equals(key)) {
 -                return String.valueOf(Integer.parseInt(value) - 1);
 -            } else if ("dubbo.service.allow.no.provider".equals(key)) {
 -                return String.valueOf(!Boolean.parseBoolean(value));
 -            }
 -        }
 -        return value;
 -    }
 -
 -    protected static void appendProperties(AbstractConfig config) {
 -        if (config == null) {
 -            return;
 -        }
 -        String prefix = "dubbo." + getTagName(config.getClass()) + ".";
 -        Method[] methods = config.getClass().getMethods();
 -        for (Method method : methods) {
 -            try {
 -                String name = method.getName();
 -                if (name.length() > 3 && name.startsWith("set") && Modifier.isPublic(method.getModifiers())
 -                        && method.getParameterTypes().length == 1 && isPrimitive(method.getParameterTypes()[0])) {
 -                    String property = StringUtils.camelToSplitName(name.substring(3, 4).toLowerCase() + name.substring(4), ".");
 -
 -                    String value = null;
 -                    if (config.getId() != null && config.getId().length() > 0) {
 -                        String pn = prefix + config.getId() + "." + property;
 -                        value = System.getProperty(pn);
 -                        if (!StringUtils.isBlank(value)) {
 -                            logger.info("Use System Property " + pn + " to config dubbo");
 -                        }
 -                    }
 -                    if (value == null || value.length() == 0) {
 -                        String pn = prefix + property;
 -                        value = System.getProperty(pn);
 -                        if (!StringUtils.isBlank(value)) {
 -                            logger.info("Use System Property " + pn + " to config dubbo");
 -                        }
 -                    }
 -                    if (value == null || value.length() == 0) {
 -                        Method getter;
 -                        try {
 -                            getter = config.getClass().getMethod("get" + name.substring(3));
 -                        } catch (NoSuchMethodException e) {
 -                            try {
 -                                getter = config.getClass().getMethod("is" + name.substring(3));
 -                            } catch (NoSuchMethodException e2) {
 -                                getter = null;
 -                            }
 -                        }
 -                        if (getter != null) {
 -                            if (getter.invoke(config) == null) {
 -                                if (config.getId() != null && config.getId().length() > 0) {
 -                                    value = ConfigUtils.getProperty(prefix + config.getId() + "." + property);
 -                                }
 -                                if (value == null || value.length() == 0) {
 -                                    value = ConfigUtils.getProperty(prefix + property);
 -                                }
 -                                if (value == null || value.length() == 0) {
 -                                    String legacyKey = legacyProperties.get(prefix + property);
 -                                    if (legacyKey != null && legacyKey.length() > 0) {
 -                                        value = convertLegacyValue(legacyKey, ConfigUtils.getProperty(legacyKey));
 -                                    }
 -                                }
 -
 -                            }
 -                        }
 -                    }
 -                    if (value != null && value.length() > 0) {
 -                        method.invoke(config, convertPrimitive(method.getParameterTypes()[0], value));
 -                    }
 -                }
 -            } catch (Exception e) {
 -                logger.error(e.getMessage(), e);
 -            }
 -        }
 -    }
 -
 -    private static String getTagName(Class<?> cls) {
 -        String tag = cls.getSimpleName();
 -        for (String suffix : SUFFIXES) {
 -            if (tag.endsWith(suffix)) {
 -                tag = tag.substring(0, tag.length() - suffix.length());
 -                break;
 -            }
 -        }
 -        tag = tag.toLowerCase();
 -        return tag;
 -    }
 -
 -    protected static void appendParameters(Map<String, String> parameters, Object config) {
 -        appendParameters(parameters, config, null);
 -    }
 -
 -    @SuppressWarnings("unchecked")
 -    protected static void appendParameters(Map<String, String> parameters, Object config, String prefix) {
 -        if (config == null) {
 -            return;
 -        }
 -        Method[] methods = config.getClass().getMethods();
 -        for (Method method : methods) {
 -            try {
 -                String name = method.getName();
 -                if ((name.startsWith("get") || name.startsWith("is"))
 -                        && !"getClass".equals(name)
 -                        && Modifier.isPublic(method.getModifiers())
 -                        && method.getParameterTypes().length == 0
 -                        && isPrimitive(method.getReturnType())) {
 -                    Parameter parameter = method.getAnnotation(Parameter.class);
 -                    if (method.getReturnType() == Object.class || parameter != null && parameter.excluded()) {
 -                        continue;
 -                    }
 -                    int i = name.startsWith("get") ? 3 : 2;
 -                    String prop = StringUtils.camelToSplitName(name.substring(i, i + 1).toLowerCase() + name.substring(i + 1), ".");
 -                    String key;
 -                    if (parameter != null && parameter.key().length() > 0) {
 -                        key = parameter.key();
 -                    } else {
 -                        key = prop;
 -                    }
 -                    Object value = method.invoke(config);
 -                    String str = String.valueOf(value).trim();
 -                    if (value != null && str.length() > 0) {
 -                        if (parameter != null && parameter.escaped()) {
 -                            str = URL.encode(str);
 -                        }
 -                        if (parameter != null && parameter.append()) {
 -                            String pre = parameters.get(Constants.DEFAULT_KEY + "." + key);
 -                            if (pre != null && pre.length() > 0) {
 -                                str = pre + "," + str;
 -                            }
 -                            pre = parameters.get(key);
 -                            if (pre != null && pre.length() > 0) {
 -                                str = pre + "," + str;
 -                            }
 -                        }
 -                        if (prefix != null && prefix.length() > 0) {
 -                            key = prefix + "." + key;
 -                        }
 -                        parameters.put(key, str);
 -                    } else if (parameter != null && parameter.required()) {
 -                        throw new IllegalStateException(config.getClass().getSimpleName() + "." + key + " == null");
 -                    }
 -                } else if ("getParameters".equals(name)
 -                        && Modifier.isPublic(method.getModifiers())
 -                        && method.getParameterTypes().length == 0
 -                        && method.getReturnType() == Map.class) {
 -                    Map<String, String> map = (Map<String, String>) method.invoke(config, new Object[0]);
 -                    if (map != null && map.size() > 0) {
 -                        String pre = (prefix != null && prefix.length() > 0 ? prefix + "." : "");
 -                        for (Map.Entry<String, String> entry : map.entrySet()) {
 -                            parameters.put(pre + entry.getKey().replace('-', '.'), entry.getValue());
 -                        }
 -                    }
 -                }
 -            } catch (Exception e) {
 -                throw new IllegalStateException(e.getMessage(), e);
 -            }
 -        }
 -    }
 -
 -    protected static void appendAttributes(Map<String, Object> parameters, Object config) {
 -        appendAttributes(parameters, config, null);
 -    }
 -
 -    protected static void appendAttributes(Map<String, Object> parameters, Object config, String prefix) {
 -        if (config == null) {
 -            return;
 -        }
 -        Method[] methods = config.getClass().getMethods();
 -        for (Method method : methods) {
 -            try {
 -                Parameter parameter = method.getAnnotation(Parameter.class);
 -                if (parameter == null || !parameter.attribute()) {
 -                    continue;
 -                }
 -                String name = method.getName();
 -                if ((name.startsWith("get") || name.startsWith("is"))
 -                        && !"getClass".equals(name)
 -                        && Modifier.isPublic(method.getModifiers())
 -                        && method.getParameterTypes().length == 0
 -                        && isPrimitive(method.getReturnType())) {
 -                    String key;
 -                    if (parameter.key().length() > 0) {
 -                        key = parameter.key();
 -                    } else {
 -                        int i = name.startsWith("get") ? 3 : 2;
 -                        key = name.substring(i, i + 1).toLowerCase() + name.substring(i + 1);
 -                    }
 -                    Object value = method.invoke(config);
 -                    if (value != null) {
 -                        if (prefix != null && prefix.length() > 0) {
 -                            key = prefix + "." + key;
 -                        }
 -                        parameters.put(key, value);
 -                    }
 -                }
 -            } catch (Exception e) {
 -                throw new IllegalStateException(e.getMessage(), e);
 -            }
 -        }
 -    }
 -
 -    protected static ConsumerMethodModel.AsyncMethodInfo convertMethodConfig2AyncInfo(MethodConfig methodConfig) {
 -        if (methodConfig == null || (methodConfig.getOninvoke() == null && methodConfig.getOnreturn() == null && methodConfig.getOnthrow() == null)) {
 -            return null;
 -        }
 -
 -        //check config conflict
 -        if (Boolean.FALSE.equals(methodConfig.isReturn()) && (methodConfig.getOnreturn() != null || methodConfig.getOnthrow() != null)) {
 -            throw new IllegalStateException("method config error : return attribute must be set true when onreturn or onthrow has been set.");
 -        }
 -
 -        ConsumerMethodModel.AsyncMethodInfo asyncMethodInfo = new ConsumerMethodModel.AsyncMethodInfo();
 -
 -        asyncMethodInfo.setOninvokeInstance(methodConfig.getOninvoke());
 -        asyncMethodInfo.setOnreturnInstance(methodConfig.getOnreturn());
 -        asyncMethodInfo.setOnthrowInstance(methodConfig.getOnthrow());
 -
 -        try {
 -            String oninvokeMethod = methodConfig.getOninvokeMethod();
 -            if (StringUtils.isNotEmpty(oninvokeMethod)) {
 -                asyncMethodInfo.setOninvokeMethod(getMethodByName(methodConfig.getOninvoke().getClass(), oninvokeMethod));
 -            }
 -
 -            String onreturnMethod = methodConfig.getOnreturnMethod();
 -            if (StringUtils.isNotEmpty(onreturnMethod)) {
 -                asyncMethodInfo.setOnreturnMethod(getMethodByName(methodConfig.getOnreturn().getClass(), onreturnMethod));
 -            }
 -
 -            String onthrowMethod = methodConfig.getOnthrowMethod();
 -            if (StringUtils.isNotEmpty(onthrowMethod)) {
 -                asyncMethodInfo.setOnthrowMethod(getMethodByName(methodConfig.getOnthrow().getClass(), onthrowMethod));
 -            }
 -        } catch (Exception e) {
 -            throw new IllegalStateException(e.getMessage(), e);
 -        }
 -
 -        return asyncMethodInfo;
 -    }
 -
 -    private static Method getMethodByName(Class<?> clazz, String methodName) {
 -        try {
 -            return ReflectUtils.findMethodByMethodName(clazz, methodName);
 -        } catch (Exception e) {
 -            throw new IllegalStateException(e);
 -        }
 -    }
 -
 -    private static boolean isPrimitive(Class<?> type) {
 -        return type.isPrimitive()
 -                || type == String.class
 -                || type == Character.class
 -                || type == Boolean.class
 -                || type == Byte.class
 -                || type == Short.class
 -                || type == Integer.class
 -                || type == Long.class
 -                || type == Float.class
 -                || type == Double.class
 -                || type == Object.class;
 -    }
 -
 -    private static Object convertPrimitive(Class<?> type, String value) {
 -        if (type == char.class || type == Character.class) {
 -            return value.length() > 0 ? value.charAt(0) : '\0';
 -        } else if (type == boolean.class || type == Boolean.class) {
 -            return Boolean.valueOf(value);
 -        } else if (type == byte.class || type == Byte.class) {
 -            return Byte.valueOf(value);
 -        } else if (type == short.class || type == Short.class) {
 -            return Short.valueOf(value);
 -        } else if (type == int.class || type == Integer.class) {
 -            return Integer.valueOf(value);
 -        } else if (type == long.class || type == Long.class) {
 -            return Long.valueOf(value);
 -        } else if (type == float.class || type == Float.class) {
 -            return Float.valueOf(value);
 -        } else if (type == double.class || type == Double.class) {
 -            return Double.valueOf(value);
 -        }
 -        return value;
 -    }
 -
 -    protected static void checkExtension(Class<?> type, String property, String value) {
 -        checkName(property, value);
 -        if (value != null && value.length() > 0
 -                && !ExtensionLoader.getExtensionLoader(type).hasExtension(value)) {
 -            throw new IllegalStateException("No such extension " + value + " for " + property + "/" + type.getName());
 -        }
 -    }
 -
 -    protected static void checkMultiExtension(Class<?> type, String property, String value) {
 -        checkMultiName(property, value);
 -        if (value != null && value.length() > 0) {
 -            String[] values = value.split("\\s*[,]+\\s*");
 -            for (String v : values) {
 -                if (v.startsWith(Constants.REMOVE_VALUE_PREFIX)) {
 -                    v = v.substring(1);
 -                }
 -                if (Constants.DEFAULT_KEY.equals(v)) {
 -                    continue;
 -                }
 -                if (!ExtensionLoader.getExtensionLoader(type).hasExtension(v)) {
 -                    throw new IllegalStateException("No such extension " + v + " for " + property + "/" + type.getName());
 -                }
 -            }
 -        }
 -    }
 -
 -    protected static void checkLength(String property, String value) {
 -        checkProperty(property, value, MAX_LENGTH, null);
 -    }
 -
 -    protected static void checkPathLength(String property, String value) {
 -        checkProperty(property, value, MAX_PATH_LENGTH, null);
 -    }
 -
 -    protected static void checkName(String property, String value) {
 -        checkProperty(property, value, MAX_LENGTH, PATTERN_NAME);
 -    }
 -
 -    protected static void checkNameHasSymbol(String property, String value) {
 -        checkProperty(property, value, MAX_LENGTH, PATTERN_NAME_HAS_SYMBOL);
 -    }
 -
 -    protected static void checkKey(String property, String value) {
 -        checkProperty(property, value, MAX_LENGTH, PATTERN_KEY);
 -    }
 -
 -    protected static void checkMultiName(String property, String value) {
 -        checkProperty(property, value, MAX_LENGTH, PATTERN_MULTI_NAME);
 -    }
 -
 -    protected static void checkPathName(String property, String value) {
 -        checkProperty(property, value, MAX_PATH_LENGTH, PATTERN_PATH);
 -    }
 -
 -    protected static void checkMethodName(String property, String value) {
 -        checkProperty(property, value, MAX_LENGTH, PATTERN_METHOD_NAME);
 -    }
 -
 -    protected static void checkParameterName(Map<String, String> parameters) {
 -        if (parameters == null || parameters.size() == 0) {
 -            return;
 -        }
 -        for (Map.Entry<String, String> entry : parameters.entrySet()) {
 -            checkNameHasSymbol(entry.getKey(), entry.getValue());
 -        }
 -    }
 -
 -    protected static void checkProperty(String property, String value, int maxlength, Pattern pattern) {
 -        if (value == null || value.length() == 0) {
 -            return;
 -        }
 -        if (value.length() > maxlength) {
 -            throw new IllegalStateException("Invalid " + property + "=\"" + value + "\" is longer than " + maxlength);
 -        }
 -        if (pattern != null) {
 -            Matcher matcher = pattern.matcher(value);
 -            if (!matcher.matches()) {
 -                throw new IllegalStateException("Invalid " + property + "=\"" + value + "\" contains illegal " +
 -                        "character, only digit, letter, '-', '_' or '.' is legal.");
 -            }
 -        }
 -    }
 -
 -    @Parameter(excluded = true)
 -    public String getId() {
 -        return id;
 -    }
 -
 -    public void setId(String id) {
 -        this.id = id;
 -    }
 -
 -    protected void appendAnnotation(Class<?> annotationClass, Object annotation) {
 -        Method[] methods = annotationClass.getMethods();
 -        for (Method method : methods) {
 -            if (method.getDeclaringClass() != Object.class
 -                    && method.getReturnType() != void.class
 -                    && method.getParameterTypes().length == 0
 -                    && Modifier.isPublic(method.getModifiers())
 -                    && !Modifier.isStatic(method.getModifiers())) {
 -                try {
 -                    String property = method.getName();
 -                    if ("interfaceClass".equals(property) || "interfaceName".equals(property)) {
 -                        property = "interface";
 -                    }
 -                    String setter = "set" + property.substring(0, 1).toUpperCase() + property.substring(1);
 -                    Object value = method.invoke(annotation);
 -                    if (value != null && !value.equals(method.getDefaultValue())) {
 -                        Class<?> parameterType = ReflectUtils.getBoxedClass(method.getReturnType());
 -                        if ("filter".equals(property) || "listener".equals(property)) {
 -                            parameterType = String.class;
 -                            value = StringUtils.join((String[]) value, ",");
 -                        } else if ("parameters".equals(property)) {
 -                            parameterType = Map.class;
 -                            value = CollectionUtils.toStringMap((String[]) value);
 -                        }
 -                        try {
 -                            Method setterMethod = getClass().getMethod(setter, parameterType);
 -                            setterMethod.invoke(this, value);
 -                        } catch (NoSuchMethodException e) {
 -                            // ignore
 -                        }
 -                    }
 -                } catch (Throwable e) {
 -                    logger.error(e.getMessage(), e);
 -                }
 -            }
 -        }
 -    }
 -
 -    @Override
 -    public String toString() {
 -        try {
 -            StringBuilder buf = new StringBuilder();
 -            buf.append("<dubbo:");
 -            buf.append(getTagName(getClass()));
 -            Method[] methods = getClass().getMethods();
 -            for (Method method : methods) {
 -                try {
 -                    String name = method.getName();
 -                    if ((name.startsWith("get") || name.startsWith("is"))
 -                            && !"getClass".equals(name) && !"get".equals(name) && !"is".equals(name)
 -                            && Modifier.isPublic(method.getModifiers())
 -                            && method.getParameterTypes().length == 0
 -                            && isPrimitive(method.getReturnType())) {
 -                        int i = name.startsWith("get") ? 3 : 2;
 -                        String key = name.substring(i, i + 1).toLowerCase() + name.substring(i + 1);
 -                        Object value = method.invoke(this);
 -                        if (value != null) {
 -                            buf.append(" ");
 -                            buf.append(key);
 -                            buf.append("=\"");
 -                            buf.append(value);
 -                            buf.append("\"");
 -                        }
 -                    }
 -                } catch (Exception e) {
 -                    logger.warn(e.getMessage(), e);
 -                }
 -            }
 -            buf.append(" />");
 -            return buf.toString();
 -        } catch (Throwable t) {
 -            logger.warn(t.getMessage(), t);
 -            return super.toString();
 -        }
 -    }
 -
 -}
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.dubbo.config;
 +
 +import org.apache.dubbo.common.Constants;
 +import org.apache.dubbo.common.URL;
 +import org.apache.dubbo.common.config.CompositeConfiguration;
 +import org.apache.dubbo.common.config.Configuration;
 +import org.apache.dubbo.common.extension.ExtensionLoader;
 +import org.apache.dubbo.common.logger.Logger;
 +import org.apache.dubbo.common.logger.LoggerFactory;
 +import org.apache.dubbo.common.utils.CollectionUtils;
 +import org.apache.dubbo.common.utils.ReflectUtils;
 +import org.apache.dubbo.common.utils.StringUtils;
 +import org.apache.dubbo.config.context.Environment;
 +import org.apache.dubbo.config.support.Parameter;
 +import org.apache.dubbo.config.utils.ConfigConverter;
++import org.apache.dubbo.rpc.model.ConsumerMethodModel;
 +
 +import javax.annotation.PostConstruct;
 +import java.io.Serializable;
 +import java.lang.reflect.Method;
 +import java.lang.reflect.Modifier;
 +import java.util.HashMap;
 +import java.util.Map;
 +import java.util.regex.Matcher;
 +import java.util.regex.Pattern;
 +
 +/**
 + * Utility methods and public methods for parsing configuration
 + *
 + * @export
 + */
 +public abstract class AbstractConfig implements Serializable {
 +
 +    protected static final Logger logger = LoggerFactory.getLogger(AbstractConfig.class);
 +    private static final long serialVersionUID = 4267533505537413570L;
 +    private static final int MAX_LENGTH = 200;
 +
 +    private static final int MAX_PATH_LENGTH = 200;
 +
 +    private static final Pattern PATTERN_NAME = Pattern.compile("[\\-._0-9a-zA-Z]+");
 +
 +    private static final Pattern PATTERN_MULTI_NAME = Pattern.compile("[,\\-._0-9a-zA-Z]+");
 +
 +    private static final Pattern PATTERN_METHOD_NAME = Pattern.compile("[a-zA-Z][0-9a-zA-Z]*");
 +
 +    private static final Pattern PATTERN_PATH = Pattern.compile("[/\\-$._0-9a-zA-Z]+");
 +
 +    private static final Pattern PATTERN_NAME_HAS_SYMBOL = Pattern.compile("[:*,/\\-._0-9a-zA-Z]+");
 +
 +    private static final Pattern PATTERN_KEY = Pattern.compile("[*,\\-._0-9a-zA-Z]+");
 +    private static final Map<String, String> legacyProperties = new HashMap<String, String>();
 +    private static final String[] SUFFIXES = new String[]{"Config", "Bean"};
 +
 +    private boolean init;
 +    private volatile Map<String, String> metaData;
 +
 +    static {
 +        legacyProperties.put("dubbo.protocol.name", "dubbo.service.protocol");
 +        legacyProperties.put("dubbo.protocol.host", "dubbo.service.server.host");
 +        legacyProperties.put("dubbo.protocol.port", "dubbo.service.server.port");
 +        legacyProperties.put("dubbo.protocol.threads", "dubbo.service.max.thread.pool.size");
 +        legacyProperties.put("dubbo.consumer.timeout", "dubbo.service.invoke.timeout");
 +        legacyProperties.put("dubbo.consumer.retries", "dubbo.service.max.retry.providers");
 +        legacyProperties.put("dubbo.consumer.check", "dubbo.service.allow.no.provider");
 +        legacyProperties.put("dubbo.service.url", "dubbo.service.address");
 +    }
 +
 +    protected String id;
 +
 +    private static String convertLegacyValue(String key, String value) {
 +        if (value != null && value.length() > 0) {
 +            if ("dubbo.service.max.retry.providers".equals(key)) {
 +                return String.valueOf(Integer.parseInt(value) - 1);
 +            } else if ("dubbo.service.allow.no.provider".equals(key)) {
 +                return String.valueOf(!Boolean.parseBoolean(value));
 +            }
 +        }
 +        return value;
 +    }
 +
 +    private static String getTagName(Class<?> cls) {
 +        String tag = cls.getSimpleName();
 +        for (String suffix : SUFFIXES) {
 +            if (tag.endsWith(suffix)) {
 +                tag = tag.substring(0, tag.length() - suffix.length());
 +                break;
 +            }
 +        }
 +        tag = tag.toLowerCase();
 +        return tag;
 +    }
 +
 +    protected static void appendParameters(Map<String, String> parameters, Object config) {
 +        appendParameters(parameters, config, null);
 +    }
 +
 +    @SuppressWarnings("unchecked")
 +    protected static void appendParameters(Map<String, String> parameters, Object config, String prefix) {
 +        if (config == null) {
 +            return;
 +        }
 +        Method[] methods = config.getClass().getMethods();
 +        for (Method method : methods) {
 +            try {
 +                String name = method.getName();
 +                if ((name.startsWith("get") || name.startsWith("is"))
 +                        && !"getClass".equals(name)
 +                        && Modifier.isPublic(method.getModifiers())
 +                        && method.getParameterTypes().length == 0
 +                        && isPrimitive(method.getReturnType())) {
 +                    Parameter parameter = method.getAnnotation(Parameter.class);
 +                    if (method.getReturnType() == Object.class || parameter != null && parameter.excluded()) {
 +                        continue;
 +                    }
 +                    int i = name.startsWith("get") ? 3 : 2;
 +                    String prop = StringUtils.camelToSplitName(name.substring(i, i + 1).toLowerCase() + name.substring(i + 1), ".");
 +                    String key;
 +                    if (parameter != null && parameter.key().length() > 0) {
 +                        key = parameter.key();
 +                    } else {
 +                        key = prop;
 +                    }
 +                    Object value = method.invoke(config);
 +                    String str = String.valueOf(value).trim();
 +                    if (value != null && str.length() > 0) {
 +                        if (parameter != null && parameter.escaped()) {
 +                            str = URL.encode(str);
 +                        }
 +                        if (parameter != null && parameter.append()) {
 +                            String pre = parameters.get(Constants.DEFAULT_KEY + "." + key);
 +                            if (pre != null && pre.length() > 0) {
 +                                str = pre + "," + str;
 +                            }
 +                            pre = parameters.get(key);
 +                            if (pre != null && pre.length() > 0) {
 +                                str = pre + "," + str;
 +                            }
 +                        }
 +                        if (prefix != null && prefix.length() > 0) {
 +                            key = prefix + "." + key;
 +                        }
 +                        parameters.put(key, str);
 +                    } else if (parameter != null && parameter.required()) {
 +                        throw new IllegalStateException(config.getClass().getSimpleName() + "." + key + " == null");
 +                    }
 +                } else if ("getParameters".equals(name)
 +                        && Modifier.isPublic(method.getModifiers())
 +                        && method.getParameterTypes().length == 0
 +                        && method.getReturnType() == Map.class) {
 +                    Map<String, String> map = (Map<String, String>) method.invoke(config, new Object[0]);
 +                    if (map != null && map.size() > 0) {
 +                        String pre = (prefix != null && prefix.length() > 0 ? prefix + "." : "");
 +                        for (Map.Entry<String, String> entry : map.entrySet()) {
 +                            parameters.put(pre + entry.getKey().replace('-', '.'), entry.getValue());
 +                        }
 +                    }
 +                }
 +            } catch (Exception e) {
 +                throw new IllegalStateException(e.getMessage(), e);
 +            }
 +        }
 +    }
 +
-     protected static void appendAttributes(Map<Object, Object> parameters, Object config) {
++    protected static void appendAttributes(Map<String, Object> parameters, Object config) {
 +        appendAttributes(parameters, config, null);
 +    }
 +
-     protected static void appendAttributes(Map<Object, Object> parameters, Object config, String prefix) {
++    protected static void appendAttributes(Map<String, Object> parameters, Object config, String prefix) {
 +        if (config == null) {
 +            return;
 +        }
 +        Method[] methods = config.getClass().getMethods();
 +        for (Method method : methods) {
 +            try {
++                Parameter parameter = method.getAnnotation(Parameter.class);
++                if (parameter == null || !parameter.attribute()) {
++                    continue;
++                }
 +                String name = method.getName();
 +                if ((name.startsWith("get") || name.startsWith("is"))
 +                        && !"getClass".equals(name)
 +                        && Modifier.isPublic(method.getModifiers())
 +                        && method.getParameterTypes().length == 0
 +                        && isPrimitive(method.getReturnType())) {
-                     Parameter parameter = method.getAnnotation(Parameter.class);
-                     if (parameter == null || !parameter.attribute())
-                         continue;
 +                    String key;
 +                    if (parameter.key().length() > 0) {
 +                        key = parameter.key();
 +                    } else {
 +                        int i = name.startsWith("get") ? 3 : 2;
 +                        key = name.substring(i, i + 1).toLowerCase() + name.substring(i + 1);
 +                    }
 +                    Object value = method.invoke(config);
 +                    if (value != null) {
 +                        if (prefix != null && prefix.length() > 0) {
 +                            key = prefix + "." + key;
 +                        }
 +                        parameters.put(key, value);
 +                    }
 +                }
 +            } catch (Exception e) {
 +                throw new IllegalStateException(e.getMessage(), e);
 +            }
 +        }
 +    }
 +
++    protected static ConsumerMethodModel.AsyncMethodInfo convertMethodConfig2AyncInfo(MethodConfig methodConfig) {
++        if (methodConfig == null || (methodConfig.getOninvoke() == null && methodConfig.getOnreturn() == null && methodConfig.getOnthrow() == null)) {
++            return null;
++        }
++
++        //check config conflict
++        if (Boolean.FALSE.equals(methodConfig.isReturn()) && (methodConfig.getOnreturn() != null || methodConfig.getOnthrow() != null)) {
++            throw new IllegalStateException("method config error : return attribute must be set true when onreturn or onthrow has been set.");
++        }
++
++        ConsumerMethodModel.AsyncMethodInfo asyncMethodInfo = new ConsumerMethodModel.AsyncMethodInfo();
++
++        asyncMethodInfo.setOninvokeInstance(methodConfig.getOninvoke());
++        asyncMethodInfo.setOnreturnInstance(methodConfig.getOnreturn());
++        asyncMethodInfo.setOnthrowInstance(methodConfig.getOnthrow());
++
++        try {
++            String oninvokeMethod = methodConfig.getOninvokeMethod();
++            if (StringUtils.isNotEmpty(oninvokeMethod)) {
++                asyncMethodInfo.setOninvokeMethod(getMethodByName(methodConfig.getOninvoke().getClass(), oninvokeMethod));
++            }
++
++            String onreturnMethod = methodConfig.getOnreturnMethod();
++            if (StringUtils.isNotEmpty(onreturnMethod)) {
++                asyncMethodInfo.setOnreturnMethod(getMethodByName(methodConfig.getOnreturn().getClass(), onreturnMethod));
++            }
++
++            String onthrowMethod = methodConfig.getOnthrowMethod();
++            if (StringUtils.isNotEmpty(onthrowMethod)) {
++                asyncMethodInfo.setOnthrowMethod(getMethodByName(methodConfig.getOnthrow().getClass(), onthrowMethod));
++            }
++        } catch (Exception e) {
++            throw new IllegalStateException(e.getMessage(), e);
++        }
++
++        return asyncMethodInfo;
++    }
++
++    private static Method getMethodByName(Class<?> clazz, String methodName) {
++        try {
++            return ReflectUtils.findMethodByMethodName(clazz, methodName);
++        } catch (Exception e) {
++            throw new IllegalStateException(e);
++        }
++    }
++
 +    private static boolean isPrimitive(Class<?> type) {
 +        return type.isPrimitive()
 +                || type == String.class
 +                || type == Character.class
 +                || type == Boolean.class
 +                || type == Byte.class
 +                || type == Short.class
 +                || type == Integer.class
 +                || type == Long.class
 +                || type == Float.class
 +                || type == Double.class
 +                || type == Object.class;
 +    }
 +
 +    private static Object convertPrimitive(Class<?> type, String value) {
 +        if (type == char.class || type == Character.class) {
 +            return value.length() > 0 ? value.charAt(0) : '\0';
 +        } else if (type == boolean.class || type == Boolean.class) {
 +            return Boolean.valueOf(value);
 +        } else if (type == byte.class || type == Byte.class) {
 +            return Byte.valueOf(value);
 +        } else if (type == short.class || type == Short.class) {
 +            return Short.valueOf(value);
 +        } else if (type == int.class || type == Integer.class) {
 +            return Integer.valueOf(value);
 +        } else if (type == long.class || type == Long.class) {
 +            return Long.valueOf(value);
 +        } else if (type == float.class || type == Float.class) {
 +            return Float.valueOf(value);
 +        } else if (type == double.class || type == Double.class) {
 +            return Double.valueOf(value);
 +        }
 +        return value;
 +    }
 +
 +    protected static void checkExtension(Class<?> type, String property, String value) {
 +        checkName(property, value);
 +        if (value != null && value.length() > 0
 +                && !ExtensionLoader.getExtensionLoader(type).hasExtension(value)) {
 +            throw new IllegalStateException("No such extension " + value + " for " + property + "/" + type.getName());
 +        }
 +    }
 +
 +    protected static void checkMultiExtension(Class<?> type, String property, String value) {
 +        checkMultiName(property, value);
 +        if (value != null && value.length() > 0) {
 +            String[] values = value.split("\\s*[,]+\\s*");
 +            for (String v : values) {
 +                if (v.startsWith(Constants.REMOVE_VALUE_PREFIX)) {
 +                    v = v.substring(1);
 +                }
 +                if (Constants.DEFAULT_KEY.equals(v)) {
 +                    continue;
 +                }
 +                if (!ExtensionLoader.getExtensionLoader(type).hasExtension(v)) {
 +                    throw new IllegalStateException("No such extension " + v + " for " + property + "/" + type.getName());
 +                }
 +            }
 +        }
 +    }
 +
 +    protected static void checkLength(String property, String value) {
 +        checkProperty(property, value, MAX_LENGTH, null);
 +    }
 +
 +    protected static void checkPathLength(String property, String value) {
 +        checkProperty(property, value, MAX_PATH_LENGTH, null);
 +    }
 +
 +    protected static void checkName(String property, String value) {
 +        checkProperty(property, value, MAX_LENGTH, PATTERN_NAME);
 +    }
 +
 +    protected static void checkNameHasSymbol(String property, String value) {
 +        checkProperty(property, value, MAX_LENGTH, PATTERN_NAME_HAS_SYMBOL);
 +    }
 +
 +    protected static void checkKey(String property, String value) {
 +        checkProperty(property, value, MAX_LENGTH, PATTERN_KEY);
 +    }
 +
 +    protected static void checkMultiName(String property, String value) {
 +        checkProperty(property, value, MAX_LENGTH, PATTERN_MULTI_NAME);
 +    }
 +
 +    protected static void checkPathName(String property, String value) {
 +        checkProperty(property, value, MAX_PATH_LENGTH, PATTERN_PATH);
 +    }
 +
 +    protected static void checkMethodName(String property, String value) {
 +        checkProperty(property, value, MAX_LENGTH, PATTERN_METHOD_NAME);
 +    }
 +
 +    protected static void checkParameterName(Map<String, String> parameters) {
 +        if (parameters == null || parameters.size() == 0) {
 +            return;
 +        }
 +        for (Map.Entry<String, String> entry : parameters.entrySet()) {
 +            checkNameHasSymbol(entry.getKey(), entry.getValue());
 +        }
 +    }
 +
 +    protected static void checkProperty(String property, String value, int maxlength, Pattern pattern) {
 +        if (value == null || value.length() == 0) {
 +            return;
 +        }
 +        if (value.length() > maxlength) {
 +            throw new IllegalStateException("Invalid " + property + "=\"" + value + "\" is longer than " + maxlength);
 +        }
 +        if (pattern != null) {
 +            Matcher matcher = pattern.matcher(value);
 +            if (!matcher.matches()) {
 +                throw new IllegalStateException("Invalid " + property + "=\"" + value + "\" contains illegal " +
 +                        "character, only digit, letter, '-', '_' or '.' is legal.");
 +            }
 +        }
 +    }
 +
 +    @Parameter(excluded = true)
 +    public String getId() {
 +        return id;
 +    }
 +
 +    public void setId(String id) {
 +        this.id = id;
 +    }
 +
 +    protected void appendAnnotation(Class<?> annotationClass, Object annotation) {
 +        Method[] methods = annotationClass.getMethods();
 +        for (Method method : methods) {
 +            if (method.getDeclaringClass() != Object.class
 +                    && method.getReturnType() != void.class
 +                    && method.getParameterTypes().length == 0
 +                    && Modifier.isPublic(method.getModifiers())
 +                    && !Modifier.isStatic(method.getModifiers())) {
 +                try {
 +                    String property = method.getName();
 +                    if ("interfaceClass".equals(property) || "interfaceName".equals(property)) {
 +                        property = "interface";
 +                    }
 +                    String setter = "set" + property.substring(0, 1).toUpperCase() + property.substring(1);
 +                    Object value = method.invoke(annotation);
 +                    if (value != null && !value.equals(method.getDefaultValue())) {
 +                        Class<?> parameterType = ReflectUtils.getBoxedClass(method.getReturnType());
 +                        if ("filter".equals(property) || "listener".equals(property)) {
 +                            parameterType = String.class;
 +                            value = StringUtils.join((String[]) value, ",");
 +                        } else if ("parameters".equals(property)) {
 +                            parameterType = Map.class;
 +                            value = CollectionUtils.toStringMap((String[]) value);
 +                        }
 +                        try {
 +                            Method setterMethod = getClass().getMethod(setter, parameterType);
 +                            setterMethod.invoke(this, value);
 +                        } catch (NoSuchMethodException e) {
 +                            // ignore
 +                        }
 +                    }
 +                } catch (Throwable e) {
 +                    logger.error(e.getMessage(), e);
 +                }
 +            }
 +        }
 +    }
 +
 +
 +    /**
 +     * Should be called after Config was fully initialized.
 +     *
 +     * @return
 +     */
 +    public Map<String, String> getMetaData() {
 +        metaData = new HashMap<>();
 +        Method[] methods = this.getClass().getMethods();
 +        for (Method method : methods) {
 +            try {
 +                String name = method.getName();
 +                if ((name.startsWith("get") || name.startsWith("is"))
 +                        && !name.equals("get")
 +                        && !"getClass".equals(name)
 +                        && Modifier.isPublic(method.getModifiers())
 +                        && method.getParameterTypes().length == 0
 +                        && isPrimitive(method.getReturnType())) {
 +                    int i = name.startsWith("get") ? 3 : 2;
 +                    String prop = StringUtils.camelToSplitName(name.substring(i, i + 1).toLowerCase() + name.substring(i + 1), ".");
 +                    String key;
 +                    Parameter parameter = method.getAnnotation(Parameter.class);
 +                    if (parameter != null && parameter.key().length() > 0) {
 +                        key = parameter.key();
 +                    } else {
 +                        key = prop;
 +                    }
 +                    if (method.getReturnType() == Object.class || parameter != null && parameter.excluded()) {
 +                        metaData.put(key, null);
 +                        continue;
 +                    }
 +                    Object value = method.invoke(this);
 +                    String str = String.valueOf(value).trim();
 +                    if (value != null && str.length() > 0) {
 +                        if (parameter != null && parameter.escaped()) {
 +                            str = URL.encode(str);
 +                        }
 +                        if (parameter != null && parameter.append()) {
 +                            String pre = String.valueOf(metaData.get(Constants.DEFAULT_KEY + "." + key));
 +                            if (pre != null && pre.length() > 0) {
 +                                str = pre + "," + str;
 +                            }
 +                            pre = String.valueOf(metaData.get(key));
 +                            if (pre != null && pre.length() > 0) {
 +                                str = pre + "," + str;
 +                            }
 +                        }
 +                      /*  if (prefix != null && prefix.length() > 0) {
 +                            key = prefix + "." + key;
 +                        }*/
 +                        metaData.put(key, str);
 +                    } else {
 +                        metaData.put(key, null);
 +                    }
 +                    // TODO check required somewhere else.
 +                    /*else if (parameter != null && parameter.required()) {
 +                        throw new IllegalStateException(this.getClass().getSimpleName() + "." + key + " == null");
 +                    }*/
 +                } else if ("getParameters".equals(name)
 +                        && Modifier.isPublic(method.getModifiers())
 +                        && method.getParameterTypes().length == 0
 +                        && method.getReturnType() == Map.class) {
 +                    Map<String, String> map = (Map<String, String>) method.invoke(this, new Object[0]);
 +                    if (map != null && map.size() > 0) {
 +//                            String pre = (prefix != null && prefix.length() > 0 ? prefix + "." : "");
 +                        for (Map.Entry<String, String> entry : map.entrySet()) {
 +                            metaData.put(entry.getKey().replace('-', '.'), entry.getValue());
 +                        }
 +                    }
 +                }
 +            } catch (Exception e) {
 +                System.out.println(this.getClass().getName());
 +                System.out.println(method.getName());
 +                throw new IllegalStateException(e.getMessage(), e);
 +            }
 +        }
 +        return metaData;
 +    }
 +
 +    public String getPrefix() {
 +        return Constants.DUBBO + "." + getTagName(this.getClass());
 +    }
 +
 +    /**
 +     * TODO
 +     * Currently, only support overriding of properties explicitly defined in Config class, doesn't support overriding of customized parameters stored in 'parameters'.
 +     */
 +    @PostConstruct
 +    public void refresh() {
 +        if (init) {
 +            return;
 +        }
 +        init = true;
 +
 +        try {
 +            Configuration configuration = ConfigConverter.toConfiguration(this);
 +            CompositeConfiguration compositeConfiguration = Environment.getInstance().getStartupCompositeConf(getPrefix(), getId());
 +            int index = 1;
 +            if (Environment.getInstance().isConfigCenterFirst()) {
 +                index = 2;
 +            }
 +            compositeConfiguration.addConfiguration(index, configuration);
 +            // loop methods, get override value and set the new value back to method
 +            Method[] methods = getClass().getMethods();
 +            for (Method method : methods) {
 +                if (isSetter(method)) {
 +                    try {
 +                        String value = compositeConfiguration.getString(extractPropertyName(method));
 +                        if (value != null) {
 +                            method.invoke(this, convertPrimitive(method.getParameterTypes()[0], value));
 +                        }
 +                    } catch (NoSuchMethodException e) {
 +                        logger.warn("Failed to override the property " + method.getName() + " in " + this.getClass().getSimpleName() + ", please make sure every property has a getter/setter pair.");
 +                    }
 +                }
 +            }
 +        } catch (Exception e) {
 +            logger.error("Failed to override ", e);
 +        }
 +    }
 +
 +    private static boolean isSetter(Method method) {
 +        if (method.getName().startsWith("set")
 +                && !"set".equals(method.getName())
 +                && Modifier.isPublic(method.getModifiers())
 +                && method.getParameterCount() == 1
 +                && isPrimitive(method.getParameterTypes()[0])) {
 +            return true;
 +        }
 +        return false;
 +    }
 +
 +    public String extractPropertyName(Method setter) throws Exception {
 +        String propertyName = setter.getName().substring("set".length());
 +        Method getter = null;
 +        try {
 +            getter = getClass().getMethod("get" + propertyName);
 +        } catch (NoSuchMethodException e) {
 +            getter = getClass().getMethod("is" + propertyName);
 +        }
 +        Parameter parameter = getter.getAnnotation(Parameter.class);
 +        if (parameter != null && StringUtils.isNotEmpty(parameter.key())) {
 +            propertyName = parameter.key();
 +        } else {
 +            propertyName = propertyName.toLowerCase();
 +        }
 +        return propertyName;
 +    }
 +
 +    @Override
 +    public String toString() {
 +        try {
 +            StringBuilder buf = new StringBuilder();
 +            buf.append("<dubbo:");
 +            buf.append(getTagName(getClass()));
 +            Method[] methods = getClass().getMethods();
 +            for (Method method : methods) {
 +                try {
 +                    String name = method.getName();
 +                    if ((name.startsWith("get") || name.startsWith("is"))
 +                            && !"getClass".equals(name) && !"get".equals(name) && !"is".equals(name)
 +                            && Modifier.isPublic(method.getModifiers())
 +                            && method.getParameterTypes().length == 0
 +                            && isPrimitive(method.getReturnType())) {
 +                        int i = name.startsWith("get") ? 3 : 2;
 +                        String key = name.substring(i, i + 1).toLowerCase() + name.substring(i + 1);
 +                        Object value = method.invoke(this);
 +                        if (value != null) {
 +                            buf.append(" ");
 +                            buf.append(key);
 +                            buf.append("=\"");
 +                            buf.append(value);
 +                            buf.append("\"");
 +                        }
 +                    }
 +                } catch (Exception e) {
 +                    logger.warn(e.getMessage(), e);
 +                }
 +            }
 +            buf.append(" />");
 +            return buf.toString();
 +        } catch (Throwable t) {
 +            logger.warn(t.getMessage(), t);
 +            return super.toString();
 +        }
 +    }
 +
 +    /**
 +     * FIXME check @Parameter(required=true) and any conditions that need to match.
 +     */
 +    public boolean isValid() {
 +        return true;
 +    }
 +
 +}
diff --cc dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
index 927fe51,61ed531..5587340
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
@@@ -24,21 -24,18 +24,19 @@@ import org.apache.dubbo.common.config.A
  import org.apache.dubbo.common.extension.ExtensionLoader;
  import org.apache.dubbo.common.utils.ConfigUtils;
  import org.apache.dubbo.common.utils.NetUtils;
- import org.apache.dubbo.common.utils.ReflectUtils;
  import org.apache.dubbo.common.utils.StringUtils;
  import org.apache.dubbo.config.annotation.Reference;
- import org.apache.dubbo.config.model.ApplicationModel;
- import org.apache.dubbo.config.model.ConsumerModel;
  import org.apache.dubbo.config.support.Parameter;
 +import org.apache.dubbo.metadata.integration.MetadataReportService;
  import org.apache.dubbo.rpc.Invoker;
  import org.apache.dubbo.rpc.Protocol;
  import org.apache.dubbo.rpc.ProxyFactory;
- import org.apache.dubbo.rpc.StaticContext;
  import org.apache.dubbo.rpc.cluster.Cluster;
  import org.apache.dubbo.rpc.cluster.directory.StaticDirectory;
 -import org.apache.dubbo.rpc.cluster.support.AvailableCluster;
  import org.apache.dubbo.rpc.cluster.support.ClusterUtils;
 +import org.apache.dubbo.rpc.cluster.support.RegistryAwareCluster;
+ import org.apache.dubbo.rpc.model.ApplicationModel;
+ import org.apache.dubbo.rpc.model.ConsumerModel;
  import org.apache.dubbo.rpc.protocol.injvm.InjvmProtocol;
  import org.apache.dubbo.rpc.service.GenericService;
  import org.apache.dubbo.rpc.support.ProtocolUtils;
diff --cc dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
index 608b52d,e2d3969..82cf3b3
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
@@@ -27,10 -27,7 +27,8 @@@ import org.apache.dubbo.common.utils.Na
  import org.apache.dubbo.common.utils.StringUtils;
  import org.apache.dubbo.config.annotation.Service;
  import org.apache.dubbo.config.invoker.DelegateProviderMetaDataInvoker;
- import org.apache.dubbo.config.model.ApplicationModel;
- import org.apache.dubbo.config.model.ProviderModel;
  import org.apache.dubbo.config.support.Parameter;
 +import org.apache.dubbo.metadata.integration.MetadataReportService;
  import org.apache.dubbo.rpc.Exporter;
  import org.apache.dubbo.rpc.Invoker;
  import org.apache.dubbo.rpc.Protocol;
diff --cc dubbo-dependencies-bom/pom.xml
index 1c4cbc5,c95f748..242caab
--- a/dubbo-dependencies-bom/pom.xml
+++ b/dubbo-dependencies-bom/pom.xml
@@@ -98,11 -98,7 +98,12 @@@
          <kryo_version>4.0.1</kryo_version>
          <kryo_serializers_version>0.42</kryo_serializers_version>
          <fst_version>2.48-jdk-6</fst_version>
 +        <apollo_client_version>1.1.1</apollo_client_version>
 +        <archaius_version>0.7.6</archaius_version>
 +        <snakeyaml_version>1.20</snakeyaml_version>
 +        <commons_configuration_version>1.8</commons_configuration_version>
 +        <commons_lang3_version>3.8.1</commons_lang3_version>
+         <protostuff_version>1.5.9</protostuff_version>
  
          <rs_api_version>2.0</rs_api_version>
          <resteasy_version>3.0.19.Final</resteasy_version>


[incubator-dubbo] 06/07: Move UT in config-api to bootstrap temporarily, to solve the unreasonable dependency problem between modules. For long term run, we should refactor the config-api module to stop it from depending on other modules.

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch dev-metadata
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git

commit 93b1cf014af7cce13f12816ab7114881765d4471
Author: ken.lj <ke...@gmail.com>
AuthorDate: Tue Oct 30 18:14:20 2018 +0800

    Move UT in config-api to bootstrap temporarily, to solve the unreasonable dependency problem between modules. For long term run, we should refactor the config-api module to stop it from depending on other modules.
---
 dubbo-bootstrap/pom.xml                            |  64 +++
 .../apache/dubbo/config/AbstractConfigTest.java    | 515 ---------------------
 .../dubbo/config/AbstractInterfaceConfigTest.java  | 411 ----------------
 .../dubbo/config/AbstractMethodConfigTest.java     | 119 -----
 .../dubbo/config/AbstractReferenceConfigTest.java  | 157 -------
 .../dubbo/config/AbstractServiceConfigTest.java    | 181 --------
 .../apache/dubbo/config/ApplicationConfigTest.java | 177 -------
 .../apache/dubbo/config/ArgumentConfigTest.java    |  63 ---
 .../apache/dubbo/config/ConsumerConfigTest.java    |  81 ----
 .../apache/dubbo/config/GenericServiceTest.java    | 315 -------------
 .../org/apache/dubbo/config/MethodConfigTest.java  | 182 --------
 .../org/apache/dubbo/config/ModuleConfigTest.java  | 110 -----
 .../org/apache/dubbo/config/MonitorConfigTest.java | 107 -----
 .../apache/dubbo/config/ProtocolConfigTest.java    | 217 ---------
 .../apache/dubbo/config/ProviderConfigTest.java    | 219 ---------
 .../apache/dubbo/config/ReferenceConfigTest.java   | 108 -----
 .../apache/dubbo/config/RegistryConfigTest.java    | 178 -------
 .../org/apache/dubbo/config/ServiceConfigTest.java | 205 --------
 .../test/java/org/apache/dubbo/config/api/Box.java |  23 -
 .../org/apache/dubbo/config/api/DemoException.java |  42 --
 .../org/apache/dubbo/config/api/DemoService.java   |  37 --
 .../java/org/apache/dubbo/config/api/Greeting.java |  24 -
 .../java/org/apache/dubbo/config/api/User.java     |  65 ---
 .../apache/dubbo/config/cache/CacheService.java    |  26 --
 .../dubbo/config/cache/CacheServiceImpl.java       |  32 --
 .../org/apache/dubbo/config/cache/CacheTest.java   | 119 -----
 .../config/consumer/DemoActionByAnnotation.java    |  35 --
 .../dubbo/config/consumer/DemoActionBySetter.java  |  36 --
 .../dubbo/config/consumer/DemoInterceptor.java     |  31 --
 .../DelegateProviderMetaDataInvokerTest.java       |  59 ---
 .../apache/dubbo/config/mock/GreetingLocal1.java   |  21 -
 .../apache/dubbo/config/mock/GreetingLocal2.java   |  26 --
 .../apache/dubbo/config/mock/GreetingLocal3.java   |  32 --
 .../apache/dubbo/config/mock/GreetingMock1.java    |  20 -
 .../apache/dubbo/config/mock/GreetingMock2.java    |  29 --
 .../org/apache/dubbo/config/mock/MockCluster.java  |  29 --
 .../org/apache/dubbo/config/mock/MockCodec.java    |  37 --
 .../apache/dubbo/config/mock/MockDispatcher.java   |  29 --
 .../apache/dubbo/config/mock/MockExchanger.java    |  37 --
 .../dubbo/config/mock/MockExporterListener.java    |  34 --
 .../org/apache/dubbo/config/mock/MockFilter.java   |  30 --
 .../dubbo/config/mock/MockInvokerListener.java     |  33 --
 .../apache/dubbo/config/mock/MockLoadBalance.java  |  32 --
 .../org/apache/dubbo/config/mock/MockProtocol.java |  86 ----
 .../apache/dubbo/config/mock/MockProtocol2.java    |  48 --
 .../apache/dubbo/config/mock/MockProxyFactory.java |  39 --
 .../org/apache/dubbo/config/mock/MockRegistry.java | 108 -----
 .../dubbo/config/mock/MockRegistryFactory.java     |  37 --
 .../dubbo/config/mock/MockRegistryFactory2.java    |  31 --
 .../dubbo/config/mock/MockStatusChecker.java       |  28 --
 .../dubbo/config/mock/MockTelnetHandler.java       |  29 --
 .../apache/dubbo/config/mock/MockThreadPool.java   |  30 --
 .../apache/dubbo/config/mock/MockTransporter.java  |  41 --
 .../apache/dubbo/config/mock/TestProxyFactory.java |  33 --
 .../config/provider/impl/DemoServiceImpl.java      |  51 --
 .../config/url/ExporterSideConfigUrlTest.java      |  99 ----
 .../dubbo/config/url/InvokerSideConfigUrlTest.java | 228 ---------
 .../dubbo/config/url/RpcConfigGetSetProxy.java     | 166 -------
 .../org/apache/dubbo/config/url/UrlTestBase.java   | 211 ---------
 .../dubbo/config/utils/MockReferenceConfig.java    |  53 ---
 .../config/utils/ReferenceConfigCacheTest.java     | 114 -----
 .../config/validation/ValidationParameter.java     | 106 -----
 .../dubbo/config/validation/ValidationService.java |  70 ---
 .../config/validation/ValidationServiceImpl.java   |  37 --
 .../dubbo/config/validation/ValidationTest.java    | 302 ------------
 .../org.apache.dubbo.common.status.StatusChecker   |  18 -
 .../org.apache.dubbo.common.threadpool.ThreadPool  |  18 -
 .../org.apache.dubbo.registry.RegistryFactory      |   2 -
 .../services/org.apache.dubbo.remoting.Codec       |  18 -
 .../services/org.apache.dubbo.remoting.Dispatcher  |  18 -
 .../services/org.apache.dubbo.remoting.Transporter |  18 -
 .../org.apache.dubbo.remoting.exchange.Exchanger   |  18 -
 .../org.apache.dubbo.remoting.telnet.TelnetHandler |  18 -
 .../services/org.apache.dubbo.rpc.ExporterListener |  18 -
 .../META-INF/services/org.apache.dubbo.rpc.Filter  |   1 -
 .../services/org.apache.dubbo.rpc.InvokerListener  |   1 -
 .../services/org.apache.dubbo.rpc.Protocol         |   2 -
 .../services/org.apache.dubbo.rpc.ProxyFactory     |   2 -
 .../services/org.apache.dubbo.rpc.cluster.Cluster  |   1 -
 .../org.apache.dubbo.rpc.cluster.LoadBalance       |   1 -
 .../dubbo-config-api/src/test/resources/log4j.xml  |  28 --
 81 files changed, 64 insertions(+), 6392 deletions(-)

diff --git a/dubbo-bootstrap/pom.xml b/dubbo-bootstrap/pom.xml
index a082550..c01861b 100644
--- a/dubbo-bootstrap/pom.xml
+++ b/dubbo-bootstrap/pom.xml
@@ -43,5 +43,69 @@
             <artifactId>dubbo-registry-api</artifactId>
             <version>${project.parent.version}</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-monitor-default</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-rpc-dubbo</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-rpc-rmi</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-remoting-netty4</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish</groupId>
+            <artifactId>javax.el</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-registry-default</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-registry-multicast</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-serialization-hessian2</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-serialization-jdk</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java
deleted file mode 100644
index 95df3a4..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractConfigTest.java
+++ /dev/null
@@ -1,515 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config;
-
-import junit.framework.TestCase;
-import org.apache.dubbo.config.api.Greeting;
-import org.apache.dubbo.config.support.Parameter;
-import org.hamcrest.Matchers;
-import org.junit.Test;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.junit.Assert.assertThat;
-
-public class AbstractConfigTest {
-
-    //FIXME
-  /*  @Test
-    public void testAppendProperties1() throws Exception {
-        try {
-            System.setProperty("dubbo.properties.i", "1");
-            System.setProperty("dubbo.properties.c", "c");
-            System.setProperty("dubbo.properties.b", "2");
-            System.setProperty("dubbo.properties.d", "3");
-            System.setProperty("dubbo.properties.f", "4");
-            System.setProperty("dubbo.properties.l", "5");
-            System.setProperty("dubbo.properties.s", "6");
-            System.setProperty("dubbo.properties.str", "dubbo");
-            System.setProperty("dubbo.properties.bool", "true");
-            PropertiesConfig config = new PropertiesConfig();
-            AbstractConfig.appendProperties(config);
-            TestCase.assertEquals(1, config.getI());
-            TestCase.assertEquals('c', config.getC());
-            TestCase.assertEquals((byte) 0x02, config.getB());
-            TestCase.assertEquals(3d, config.getD());
-            TestCase.assertEquals(4f, config.getF());
-            TestCase.assertEquals(5L, config.getL());
-            TestCase.assertEquals(6, config.getS());
-            TestCase.assertEquals("dubbo", config.getStr());
-            TestCase.assertTrue(config.isBool());
-        } finally {
-            System.clearProperty("dubbo.properties.i");
-            System.clearProperty("dubbo.properties.c");
-            System.clearProperty("dubbo.properties.b");
-            System.clearProperty("dubbo.properties.d");
-            System.clearProperty("dubbo.properties.f");
-            System.clearProperty("dubbo.properties.l");
-            System.clearProperty("dubbo.properties.s");
-            System.clearProperty("dubbo.properties.str");
-            System.clearProperty("dubbo.properties.bool");
-        }
-    }
-
-    @Test
-    public void testAppendProperties2() throws Exception {
-        try {
-            System.setProperty("dubbo.properties.two.i", "2");
-            PropertiesConfig config = new PropertiesConfig("two");
-            AbstractConfig.appendProperties(config);
-            TestCase.assertEquals(2, config.getI());
-        } finally {
-            System.clearProperty("dubbo.properties.two.i");
-        }
-    }
-
-    @Test
-    public void testAppendProperties3() throws Exception {
-        try {
-            Properties p = new Properties();
-            p.put("dubbo.properties.str", "dubbo");
-            ConfigUtils.setProperties(p);
-            PropertiesConfig config = new PropertiesConfig();
-            AbstractConfig.appendProperties(config);
-            TestCase.assertEquals("dubbo", config.getStr());
-        } finally {
-            System.clearProperty(Constants.DUBBO_PROPERTIES_KEY);
-            ConfigUtils.setProperties(null);
-        }
-    }*/
-
-    @Test
-    public void testAppendParameters1() throws Exception {
-        Map<String, String> parameters = new HashMap<String, String>();
-        parameters.put("default.num", "one");
-        parameters.put("num", "ONE");
-        AbstractConfig.appendParameters(parameters, new ParameterConfig(1, "hello/world", 30, "password"), "prefix");
-        TestCase.assertEquals("one", parameters.get("prefix.key.1"));
-        TestCase.assertEquals("two", parameters.get("prefix.key.2"));
-        TestCase.assertEquals("ONE,one,1", parameters.get("prefix.num"));
-        TestCase.assertEquals("hello%2Fworld", parameters.get("prefix.naming"));
-        TestCase.assertEquals("30", parameters.get("prefix.age"));
-        TestCase.assertFalse(parameters.containsKey("prefix.key-2"));
-        TestCase.assertFalse(parameters.containsKey("prefix.secret"));
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void testAppendParameters2() throws Exception {
-        Map<String, String> parameters = new HashMap<String, String>();
-        AbstractConfig.appendParameters(parameters, new ParameterConfig());
-    }
-
-    @Test
-    public void testAppendParameters3() throws Exception {
-        Map<String, String> parameters = new HashMap<String, String>();
-        AbstractConfig.appendParameters(parameters, null);
-        TestCase.assertTrue(parameters.isEmpty());
-    }
-
-    @Test
-    public void testAppendParameters4() throws Exception {
-        Map<String, String> parameters = new HashMap<String, String>();
-        AbstractConfig.appendParameters(parameters, new ParameterConfig(1, "hello/world", 30, "password"));
-        TestCase.assertEquals("one", parameters.get("key.1"));
-        TestCase.assertEquals("two", parameters.get("key.2"));
-        TestCase.assertEquals("1", parameters.get("num"));
-        TestCase.assertEquals("hello%2Fworld", parameters.get("naming"));
-        TestCase.assertEquals("30", parameters.get("age"));
-    }
-
-    @Test
-    public void testAppendAttributes1() throws Exception {
-        Map<String, Object> parameters = new HashMap<String, Object>();
-        AbstractConfig.appendAttributes(parameters, new AttributeConfig('l', true, (byte) 0x01), "prefix");
-        TestCase.assertEquals('l', parameters.get("prefix.let"));
-        TestCase.assertEquals(true, parameters.get("prefix.activate"));
-        TestCase.assertFalse(parameters.containsKey("prefix.flag"));
-    }
-
-    @Test
-    public void testAppendAttributes2() throws Exception {
-        Map<String, Object> parameters = new HashMap<String, Object>();
-        AbstractConfig.appendAttributes(parameters, new AttributeConfig('l', true, (byte) 0x01));
-        TestCase.assertEquals('l', parameters.get("let"));
-        TestCase.assertEquals(true, parameters.get("activate"));
-        TestCase.assertFalse(parameters.containsKey("flag"));
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkExtension() throws Exception {
-        AbstractConfig.checkExtension(Greeting.class, "hello", "world");
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkMultiExtension1() throws Exception {
-        AbstractConfig.checkMultiExtension(Greeting.class, "hello", "default,world");
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkMultiExtension2() throws Exception {
-        AbstractConfig.checkMultiExtension(Greeting.class, "hello", "default,-world");
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkLength() throws Exception {
-        StringBuilder builder = new StringBuilder();
-        for (int i = 0; i <= 200; i++) {
-            builder.append("a");
-        }
-        AbstractConfig.checkLength("hello", builder.toString());
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkPathLength() throws Exception {
-        StringBuilder builder = new StringBuilder();
-        for (int i = 0; i <= 200; i++) {
-            builder.append("a");
-        }
-        AbstractConfig.checkPathLength("hello", builder.toString());
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkName() throws Exception {
-        AbstractConfig.checkName("hello", "world%");
-    }
-
-    @Test
-    public void checkNameHasSymbol() throws Exception {
-        try {
-            AbstractConfig.checkNameHasSymbol("hello", ":*,/-0123abcdABCD");
-        } catch (Exception e) {
-            TestCase.fail("the value should be legal.");
-        }
-    }
-
-    @Test
-    public void checkKey() throws Exception {
-        try {
-            AbstractConfig.checkKey("hello", "*,-0123abcdABCD");
-        } catch (Exception e) {
-            TestCase.fail("the value should be legal.");
-        }
-    }
-
-    @Test
-    public void checkMultiName() throws Exception {
-        try {
-            AbstractConfig.checkMultiName("hello", ",-._0123abcdABCD");
-        } catch (Exception e) {
-            TestCase.fail("the value should be legal.");
-        }
-    }
-
-    @Test
-    public void checkPathName() throws Exception {
-        try {
-            AbstractConfig.checkPathName("hello", "/-$._0123abcdABCD");
-        } catch (Exception e) {
-            TestCase.fail("the value should be legal.");
-        }
-    }
-
-    @Test
-    public void checkMethodName() throws Exception {
-        try {
-            AbstractConfig.checkMethodName("hello", "abcdABCD0123abcd");
-        } catch (Exception e) {
-            TestCase.fail("the value should be legal.");
-        }
-
-        try {
-            AbstractConfig.checkMethodName("hello", "0a");
-            TestCase.fail("the value should be illegal.");
-        } catch (Exception e) {
-            // ignore
-        }
-    }
-
-    @Test
-    public void checkParameterName() throws Exception {
-        Map<String, String> parameters = Collections.singletonMap("hello", ":*,/-._0123abcdABCD");
-        try {
-            AbstractConfig.checkParameterName(parameters);
-        } catch (Exception e) {
-            TestCase.fail("the value should be legal.");
-        }
-    }
-
-    @Test
-    @Config(interfaceClass = Greeting.class, filter = {"f1, f2"}, listener = {"l1, l2"},
-            parameters = {"k1", "v1", "k2", "v2"})
-    public void appendAnnotation() throws Exception {
-        Config config = getClass().getMethod("appendAnnotation").getAnnotation(Config.class);
-        AnnotationConfig annotationConfig = new AnnotationConfig();
-        annotationConfig.appendAnnotation(Config.class, config);
-        TestCase.assertSame(Greeting.class, annotationConfig.getInterface());
-        TestCase.assertEquals("f1, f2", annotationConfig.getFilter());
-        TestCase.assertEquals("l1, l2", annotationConfig.getListener());
-        TestCase.assertEquals(2, annotationConfig.getParameters().size());
-        TestCase.assertEquals("v1", annotationConfig.getParameters().get("k1"));
-        TestCase.assertEquals("v2", annotationConfig.getParameters().get("k2"));
-        assertThat(annotationConfig.toString(), Matchers.containsString("filter=\"f1, f2\" "));
-        assertThat(annotationConfig.toString(), Matchers.containsString("listener=\"l1, l2\" "));
-    }
-
-    private static class PropertiesConfig extends AbstractConfig {
-        private char c;
-        private boolean bool;
-        private byte b;
-        private int i;
-        private long l;
-        private float f;
-        private double d;
-        private short s;
-        private String str;
-
-        PropertiesConfig() {
-        }
-
-        PropertiesConfig(String id) {
-            this.id = id;
-        }
-
-        public char getC() {
-            return c;
-        }
-
-        public void setC(char c) {
-            this.c = c;
-        }
-
-        public boolean isBool() {
-            return bool;
-        }
-
-        public void setBool(boolean bool) {
-            this.bool = bool;
-        }
-
-        public byte getB() {
-            return b;
-        }
-
-        public void setB(byte b) {
-            this.b = b;
-        }
-
-        public int getI() {
-            return i;
-        }
-
-        public void setI(int i) {
-            this.i = i;
-        }
-
-        public long getL() {
-            return l;
-        }
-
-        public void setL(long l) {
-            this.l = l;
-        }
-
-        public float getF() {
-            return f;
-        }
-
-        public void setF(float f) {
-            this.f = f;
-        }
-
-        public double getD() {
-            return d;
-        }
-
-        public void setD(double d) {
-            this.d = d;
-        }
-
-        public String getStr() {
-            return str;
-        }
-
-        public void setStr(String str) {
-            this.str = str;
-        }
-
-        public short getS() {
-            return s;
-        }
-
-        public void setS(short s) {
-            this.s = s;
-        }
-    }
-
-    private static class ParameterConfig {
-        private int number;
-        private String name;
-        private int age;
-        private String secret;
-
-        ParameterConfig() {
-        }
-
-        ParameterConfig(int number, String name, int age, String secret) {
-            this.number = number;
-            this.name = name;
-            this.age = age;
-            this.secret = secret;
-        }
-
-        @Parameter(key = "num", append = true)
-        public int getNumber() {
-            return number;
-        }
-
-        public void setNumber(int number) {
-            this.number = number;
-        }
-
-        @Parameter(key = "naming", append = true, escaped = true, required = true)
-        public String getName() {
-            return name;
-        }
-
-        public void setName(String name) {
-            this.name = name;
-        }
-
-        public int getAge() {
-            return age;
-        }
-
-        public void setAge(int age) {
-            this.age = age;
-        }
-
-        @Parameter(excluded = true)
-        public String getSecret() {
-            return secret;
-        }
-
-        public void setSecret(String secret) {
-            this.secret = secret;
-        }
-
-        public Map getParameters() {
-            Map<String, String> map = new HashMap<String, String>();
-            map.put("key.1", "one");
-            map.put("key-2", "two");
-            return map;
-        }
-    }
-
-    private static class AttributeConfig {
-        private char letter;
-        private boolean activate;
-        private byte flag;
-
-        public AttributeConfig(char letter, boolean activate, byte flag) {
-            this.letter = letter;
-            this.activate = activate;
-            this.flag = flag;
-        }
-
-        @Parameter(attribute = true, key = "let")
-        public char getLetter() {
-            return letter;
-        }
-
-        public void setLetter(char letter) {
-            this.letter = letter;
-        }
-
-        @Parameter(attribute = true)
-        public boolean isActivate() {
-            return activate;
-        }
-
-        public void setActivate(boolean activate) {
-            this.activate = activate;
-        }
-
-        public byte getFlag() {
-            return flag;
-        }
-
-        public void setFlag(byte flag) {
-            this.flag = flag;
-        }
-    }
-
-    @Retention(RetentionPolicy.RUNTIME)
-    @Target({ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE})
-    public @interface Config {
-        Class<?> interfaceClass() default void.class;
-
-        String interfaceName() default "";
-
-        String[] filter() default {};
-
-        String[] listener() default {};
-
-        String[] parameters() default {};
-    }
-
-    private static class AnnotationConfig extends AbstractConfig {
-        private Class interfaceClass;
-        private String filter;
-        private String listener;
-        private Map<String, String> parameters;
-
-        public Class getInterface() {
-            return interfaceClass;
-        }
-
-        public void setInterface(Class interfaceName) {
-            this.interfaceClass = interfaceName;
-        }
-
-        public String getFilter() {
-            return filter;
-        }
-
-        public void setFilter(String filter) {
-            this.filter = filter;
-        }
-
-        public String getListener() {
-            return listener;
-        }
-
-        public void setListener(String listener) {
-            this.listener = listener;
-        }
-
-        public Map<String, String> getParameters() {
-            return parameters;
-        }
-
-        public void setParameters(Map<String, String> parameters) {
-            this.parameters = parameters;
-        }
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractInterfaceConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractInterfaceConfigTest.java
deleted file mode 100644
index 2ea6fb4..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractInterfaceConfigTest.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config;
-
-import org.apache.dubbo.common.Constants;
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.common.utils.ConfigUtils;
-import org.apache.dubbo.common.utils.IOUtils;
-import org.apache.dubbo.config.api.Greeting;
-import org.apache.dubbo.config.mock.GreetingLocal1;
-import org.apache.dubbo.config.mock.GreetingLocal2;
-import org.apache.dubbo.config.mock.GreetingLocal3;
-import org.apache.dubbo.config.mock.GreetingMock1;
-import org.apache.dubbo.config.mock.GreetingMock2;
-import org.apache.dubbo.monitor.MonitorService;
-import org.apache.dubbo.registry.RegistryService;
-import junit.framework.TestCase;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
-
-public class AbstractInterfaceConfigTest {
-    @ClassRule
-    public static TemporaryFolder tempDir = new TemporaryFolder();
-    private static File dubboProperties;
-
-    @BeforeClass
-    public static void setUp() throws Exception {
-        dubboProperties = tempDir.newFile(Constants.DUBBO_PROPERTIES_KEY);
-        System.setProperty(Constants.DUBBO_PROPERTIES_KEY, dubboProperties.getAbsolutePath());
-    }
-
-    @AfterClass
-    public static void tearDown() throws Exception {
-        System.clearProperty(Constants.DUBBO_PROPERTIES_KEY);
-    }
-
-    @Test
-    public void testCheckRegistry1() throws Exception {
-        System.setProperty("dubbo.registry.address", "addr1|addr2");
-        try {
-            InterfaceConfig interfaceConfig = new InterfaceConfig();
-            interfaceConfig.checkRegistry();
-            TestCase.assertEquals(2, interfaceConfig.getRegistries().size());
-        } finally {
-            System.clearProperty("dubbo.registry.address");
-        }
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void testCheckRegistry2() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.checkRegistry();
-    }
-
-    @Test
-    public void checkApplication1() throws Exception {
-        try {
-            ConfigUtils.setProperties(null);
-            System.clearProperty(Constants.SHUTDOWN_WAIT_KEY);
-            System.clearProperty(Constants.SHUTDOWN_WAIT_SECONDS_KEY);
-
-            writeDubboProperties(Constants.SHUTDOWN_WAIT_KEY, "100");
-            System.setProperty("dubbo.application.name", "demo");
-            InterfaceConfig interfaceConfig = new InterfaceConfig();
-            interfaceConfig.checkApplication();
-            ApplicationConfig appConfig = interfaceConfig.getApplication();
-            TestCase.assertEquals("demo", appConfig.getName());
-            TestCase.assertEquals("100", System.getProperty(Constants.SHUTDOWN_WAIT_KEY));
-
-            System.clearProperty(Constants.SHUTDOWN_WAIT_KEY);
-            ConfigUtils.setProperties(null);
-            writeDubboProperties(Constants.SHUTDOWN_WAIT_SECONDS_KEY, "1000");
-            System.setProperty("dubbo.application.name", "demo");
-            interfaceConfig = new InterfaceConfig();
-            interfaceConfig.checkApplication();
-            TestCase.assertEquals("1000", System.getProperty(Constants.SHUTDOWN_WAIT_SECONDS_KEY));
-        } finally {
-            ConfigUtils.setProperties(null);
-            System.clearProperty("dubbo.application.name");
-            System.clearProperty(Constants.SHUTDOWN_WAIT_KEY);
-            System.clearProperty(Constants.SHUTDOWN_WAIT_SECONDS_KEY);
-        }
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkApplication2() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.checkApplication();
-    }
-
-    @Test
-    public void testLoadRegistries() throws Exception {
-        System.setProperty("dubbo.registry.address", "addr1");
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        List<URL> urls = interfaceConfig.loadRegistries(true);
-        TestCase.assertEquals(1, urls.size());
-        URL url = urls.get(0);
-        TestCase.assertEquals("registry", url.getProtocol());
-        TestCase.assertEquals("addr1:9090", url.getAddress());
-        TestCase.assertEquals(RegistryService.class.getName(), url.getPath());
-        TestCase.assertTrue(url.getParameters().containsKey("timestamp"));
-        TestCase.assertTrue(url.getParameters().containsKey("pid"));
-        TestCase.assertTrue(url.getParameters().containsKey("registry"));
-        TestCase.assertTrue(url.getParameters().containsKey("dubbo"));
-    }
-
-    @Test
-    public void testLoadMonitor() throws Exception {
-        System.setProperty("dubbo.monitor.address", "monitor-addr:12080");
-        System.setProperty("dubbo.monitor.protocol", "monitor");
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        URL url = interfaceConfig.loadMonitor(new URL("dubbo", "addr1", 9090));
-        TestCase.assertEquals("monitor-addr:12080", url.getAddress());
-        TestCase.assertEquals(MonitorService.class.getName(), url.getParameter("interface"));
-        TestCase.assertNotNull(url.getParameter("dubbo"));
-        TestCase.assertNotNull(url.getParameter("pid"));
-        TestCase.assertNotNull(url.getParameter("timestamp"));
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkInterfaceAndMethods1() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.checkInterfaceAndMethods(null, null);
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkInterfaceAndMethods2() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.checkInterfaceAndMethods(AbstractInterfaceConfigTest.class, null);
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkInterfaceAndMethod3() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.checkInterfaceAndMethods(Greeting.class, Collections.singletonList(methodConfig));
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkInterfaceAndMethod4() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        methodConfig.setName("nihao");
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.checkInterfaceAndMethods(Greeting.class, Collections.singletonList(methodConfig));
-    }
-
-    @Test
-    public void checkInterfaceAndMethod5() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        methodConfig.setName("hello");
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.checkInterfaceAndMethods(Greeting.class, Collections.singletonList(methodConfig));
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkStubAndMock1() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setLocal(GreetingLocal1.class.getName());
-        interfaceConfig.checkStubAndMock(Greeting.class);
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkStubAndMock2() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setLocal(GreetingLocal2.class.getName());
-        interfaceConfig.checkStubAndMock(Greeting.class);
-    }
-
-    @Test
-    public void checkStubAndMock3() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setLocal(GreetingLocal3.class.getName());
-        interfaceConfig.checkStubAndMock(Greeting.class);
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkStubAndMock4() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setStub(GreetingLocal1.class.getName());
-        interfaceConfig.checkStubAndMock(Greeting.class);
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkStubAndMock5() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setStub(GreetingLocal2.class.getName());
-        interfaceConfig.checkStubAndMock(Greeting.class);
-    }
-
-    @Test
-    public void checkStubAndMock6() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setStub(GreetingLocal3.class.getName());
-        interfaceConfig.checkStubAndMock(Greeting.class);
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkStubAndMock7() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setMock("return {a, b}");
-        interfaceConfig.checkStubAndMock(Greeting.class);
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkStubAndMock8() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setMock(GreetingMock1.class.getName());
-        interfaceConfig.checkStubAndMock(Greeting.class);
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void checkStubAndMock9() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setMock(GreetingMock2.class.getName());
-        interfaceConfig.checkStubAndMock(Greeting.class);
-    }
-
-    @Test
-    public void testLocal() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setLocal((Boolean) null);
-        TestCase.assertNull(interfaceConfig.getLocal());
-        interfaceConfig.setLocal(true);
-        TestCase.assertEquals("true", interfaceConfig.getLocal());
-        interfaceConfig.setLocal("GreetingMock");
-        TestCase.assertEquals("GreetingMock", interfaceConfig.getLocal());
-    }
-
-    @Test
-    public void testStub() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setStub((Boolean) null);
-        TestCase.assertNull(interfaceConfig.getStub());
-        interfaceConfig.setStub(true);
-        TestCase.assertEquals("true", interfaceConfig.getStub());
-        interfaceConfig.setStub("GreetingMock");
-        TestCase.assertEquals("GreetingMock", interfaceConfig.getStub());
-    }
-
-    @Test
-    public void testCluster() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setCluster("mockcluster");
-        TestCase.assertEquals("mockcluster", interfaceConfig.getCluster());
-    }
-
-    @Test
-    public void testProxy() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setProxy("mockproxyfactory");
-        TestCase.assertEquals("mockproxyfactory", interfaceConfig.getProxy());
-    }
-
-    @Test
-    public void testConnections() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setConnections(1);
-        TestCase.assertEquals(1, interfaceConfig.getConnections().intValue());
-    }
-
-    @Test
-    public void testFilter() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setFilter("mockfilter");
-        TestCase.assertEquals("mockfilter", interfaceConfig.getFilter());
-    }
-
-    @Test
-    public void testListener() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setListener("mockinvokerlistener");
-        TestCase.assertEquals("mockinvokerlistener", interfaceConfig.getListener());
-    }
-
-    @Test
-    public void testLayer() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setLayer("layer");
-        TestCase.assertEquals("layer", interfaceConfig.getLayer());
-    }
-
-    @Test
-    public void testApplication() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        ApplicationConfig applicationConfig = new ApplicationConfig();
-        interfaceConfig.setApplication(applicationConfig);
-        TestCase.assertSame(applicationConfig, interfaceConfig.getApplication());
-    }
-
-    @Test
-    public void testModule() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        ModuleConfig moduleConfig = new ModuleConfig();
-        interfaceConfig.setModule(moduleConfig);
-        TestCase.assertSame(moduleConfig, interfaceConfig.getModule());
-    }
-
-    @Test
-    public void testRegistry() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        RegistryConfig registryConfig = new RegistryConfig();
-        interfaceConfig.setRegistry(registryConfig);
-        TestCase.assertSame(registryConfig, interfaceConfig.getRegistry());
-    }
-
-    @Test
-    public void testRegistries() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        RegistryConfig registryConfig = new RegistryConfig();
-        interfaceConfig.setRegistries(Collections.singletonList(registryConfig));
-        TestCase.assertEquals(1, interfaceConfig.getRegistries().size());
-        TestCase.assertSame(registryConfig, interfaceConfig.getRegistries().get(0));
-    }
-
-    @Test
-    public void testMonitor() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setMonitor("monitor-addr");
-        TestCase.assertEquals("monitor-addr", interfaceConfig.getMonitor().getAddress());
-        MonitorConfig monitorConfig = new MonitorConfig();
-        interfaceConfig.setMonitor(monitorConfig);
-        TestCase.assertSame(monitorConfig, interfaceConfig.getMonitor());
-    }
-
-    @Test
-    public void testOwner() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setOwner("owner");
-        TestCase.assertEquals("owner", interfaceConfig.getOwner());
-    }
-
-    @Test
-    public void testCallbacks() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setCallbacks(2);
-        TestCase.assertEquals(2, interfaceConfig.getCallbacks().intValue());
-    }
-
-    @Test
-    public void testOnconnect() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setOnconnect("onConnect");
-        TestCase.assertEquals("onConnect", interfaceConfig.getOnconnect());
-    }
-
-    @Test
-    public void testOndisconnect() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setOndisconnect("onDisconnect");
-        TestCase.assertEquals("onDisconnect", interfaceConfig.getOndisconnect());
-    }
-
-    @Test
-    public void testScope() throws Exception {
-        InterfaceConfig interfaceConfig = new InterfaceConfig();
-        interfaceConfig.setScope("scope");
-        TestCase.assertEquals("scope", interfaceConfig.getScope());
-    }
-
-    private void writeDubboProperties(String key, String value) {
-        OutputStream os = null;
-        try {
-            os = new BufferedOutputStream(new FileOutputStream(dubboProperties));
-            Properties properties = new Properties();
-            properties.put(key, value);
-            properties.store(os, "");
-            os.close();
-        } catch (IOException e) {
-            if (os != null) {
-                try {
-                    os.close();
-                } catch (IOException ioe) {
-                    // ignore
-                }
-            }
-        }
-    }
-
-    private static class InterfaceConfig extends AbstractInterfaceConfig {
-
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractMethodConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractMethodConfigTest.java
deleted file mode 100644
index 41549e3..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractMethodConfigTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config;
-
-import org.junit.Test;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.isEmptyOrNullString;
-import static org.hamcrest.Matchers.sameInstance;
-import static org.junit.Assert.assertThat;
-
-public class AbstractMethodConfigTest {
-    @Test
-    public void testTimeout() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        methodConfig.setTimeout(10);
-        assertThat(methodConfig.getTimeout(), equalTo(10));
-    }
-
-    @Test
-    public void testRetries() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        methodConfig.setRetries(3);
-        assertThat(methodConfig.getRetries(), equalTo(3));
-    }
-
-    @Test
-    public void testLoadbalance() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        methodConfig.setLoadbalance("mockloadbalance");
-        assertThat(methodConfig.getLoadbalance(), equalTo("mockloadbalance"));
-    }
-
-    @Test
-    public void testAsync() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        methodConfig.setAsync(true);
-        assertThat(methodConfig.isAsync(), is(true));
-    }
-
-    @Test
-    public void testActives() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        methodConfig.setActives(10);
-        assertThat(methodConfig.getActives(), equalTo(10));
-    }
-
-    @Test
-    public void testSent() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        methodConfig.setSent(true);
-        assertThat(methodConfig.getSent(), is(true));
-    }
-
-    @Test
-    public void testMock() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        methodConfig.setMock((Boolean) null);
-        assertThat(methodConfig.getMock(), isEmptyOrNullString());
-        methodConfig.setMock(true);
-        assertThat(methodConfig.getMock(), equalTo("true"));
-        methodConfig.setMock("return null");
-        assertThat(methodConfig.getMock(), equalTo("return null"));
-        methodConfig.setMock("mock");
-        assertThat(methodConfig.getMock(), equalTo("mock"));
-    }
-
-    @Test
-    public void testMerger() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        methodConfig.setMerger("merger");
-        assertThat(methodConfig.getMerger(), equalTo("merger"));
-    }
-
-    @Test
-    public void testCache() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        methodConfig.setCache("cache");
-        assertThat(methodConfig.getCache(), equalTo("cache"));
-    }
-
-    @Test
-    public void testValidation() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        methodConfig.setValidation("validation");
-        assertThat(methodConfig.getValidation(), equalTo("validation"));
-    }
-
-    @Test
-    public void testParameters() throws Exception {
-        MethodConfig methodConfig = new MethodConfig();
-        Map<String, String> parameters = new HashMap<String, String>();
-        parameters.put("key", "value");
-        methodConfig.setParameters(parameters);
-        assertThat(methodConfig.getParameters(), sameInstance(parameters));
-    }
-
-    private static class MethodConfig extends AbstractMethodConfig {
-
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractReferenceConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractReferenceConfigTest.java
deleted file mode 100644
index a53217c..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractReferenceConfigTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config;
-
-import org.apache.dubbo.common.Constants;
-import org.junit.Test;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.hasKey;
-import static org.hamcrest.Matchers.hasValue;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
-public class AbstractReferenceConfigTest {
-
-    @Test
-    public void testCheck() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setCheck(true);
-        assertThat(referenceConfig.isCheck(), is(true));
-    }
-
-    @Test
-    public void testInit() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setInit(true);
-        assertThat(referenceConfig.isInit(), is(true));
-    }
-
-    @Test
-    public void testGeneric() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setGeneric(true);
-        assertThat(referenceConfig.isGeneric(), is(true));
-        Map<String, String> parameters = new HashMap<String, String>();
-        AbstractInterfaceConfig.appendParameters(parameters, referenceConfig);
-        // FIXME: not sure why AbstractReferenceConfig has both isGeneric and getGeneric
-        assertThat(parameters, hasKey("generic"));
-    }
-
-    @Test
-    public void testInjvm() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setInit(true);
-        assertThat(referenceConfig.isInit(), is(true));
-    }
-
-    @Test
-    public void testFilter() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setFilter("mockfilter");
-        assertThat(referenceConfig.getFilter(), equalTo("mockfilter"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        parameters.put(Constants.REFERENCE_FILTER_KEY, "prefilter");
-        AbstractInterfaceConfig.appendParameters(parameters, referenceConfig);
-        assertThat(parameters, hasValue("prefilter,mockfilter"));
-    }
-
-    @Test
-    public void testListener() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setListener("mockinvokerlistener");
-        assertThat(referenceConfig.getListener(), equalTo("mockinvokerlistener"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        parameters.put(Constants.INVOKER_LISTENER_KEY, "prelistener");
-        AbstractInterfaceConfig.appendParameters(parameters, referenceConfig);
-        assertThat(parameters, hasValue("prelistener,mockinvokerlistener"));
-    }
-
-    @Test
-    public void testLazy() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setLazy(true);
-        assertThat(referenceConfig.getLazy(), is(true));
-    }
-
-    @Test
-    public void testOnconnect() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setOnconnect("onConnect");
-        assertThat(referenceConfig.getOnconnect(), equalTo("onConnect"));
-        assertThat(referenceConfig.getStubevent(), is(true));
-    }
-
-    @Test
-    public void testOndisconnect() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setOndisconnect("onDisconnect");
-        assertThat(referenceConfig.getOndisconnect(), equalTo("onDisconnect"));
-        assertThat(referenceConfig.getStubevent(), is(true));
-    }
-
-    @Test
-    public void testStubevent() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setOnconnect("onConnect");
-        Map<String, String> parameters = new HashMap<String, String>();
-        AbstractInterfaceConfig.appendParameters(parameters, referenceConfig);
-        assertThat(parameters, hasKey(Constants.STUB_EVENT_KEY));
-    }
-
-    @Test
-    public void testReconnect() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setReconnect("reconnect");
-        Map<String, String> parameters = new HashMap<String, String>();
-        AbstractInterfaceConfig.appendParameters(parameters, referenceConfig);
-        assertThat(referenceConfig.getReconnect(), equalTo("reconnect"));
-        assertThat(parameters, hasKey(Constants.RECONNECT_KEY));
-    }
-
-    @Test
-    public void testSticky() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setSticky(true);
-        Map<String, String> parameters = new HashMap<String, String>();
-        AbstractInterfaceConfig.appendParameters(parameters, referenceConfig);
-        assertThat(referenceConfig.getSticky(), is(true));
-        assertThat(parameters, hasKey(Constants.CLUSTER_STICKY_KEY));
-    }
-
-    @Test
-    public void testVersion() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setVersion("version");
-        assertThat(referenceConfig.getVersion(), equalTo("version"));
-    }
-
-    @Test
-    public void testGroup() throws Exception {
-        ReferenceConfig referenceConfig = new ReferenceConfig();
-        referenceConfig.setGroup("group");
-        assertThat(referenceConfig.getGroup(), equalTo("group"));
-    }
-
-    private static class ReferenceConfig extends AbstractReferenceConfig {
-
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractServiceConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractServiceConfigTest.java
deleted file mode 100644
index 3f79541..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/AbstractServiceConfigTest.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config;
-
-import org.apache.dubbo.common.Constants;
-import org.junit.Test;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.hasEntry;
-import static org.hamcrest.Matchers.hasSize;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.notNullValue;
-import static org.hamcrest.Matchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-public class AbstractServiceConfigTest {
-    @Test
-    public void testVersion() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setVersion("version");
-        assertThat(serviceConfig.getVersion(), equalTo("version"));
-    }
-
-    @Test
-    public void testGroup() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setGroup("group");
-        assertThat(serviceConfig.getGroup(), equalTo("group"));
-    }
-
-    @Test
-    public void testDelay() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setDelay(1000);
-        assertThat(serviceConfig.getDelay(), equalTo(1000));
-    }
-
-    @Test
-    public void testExport() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setExport(true);
-        assertThat(serviceConfig.getExport(), is(true));
-    }
-
-    @Test
-    public void testWeight() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setWeight(500);
-        assertThat(serviceConfig.getWeight(), equalTo(500));
-    }
-
-    @Test
-    public void testDocument() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setDocument("http://dubbo.io");
-        assertThat(serviceConfig.getDocument(), equalTo("http://dubbo.io"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        AbstractServiceConfig.appendParameters(parameters, serviceConfig);
-        assertThat(parameters, hasEntry("document", "http%3A%2F%2Fdubbo.io"));
-    }
-
-    @Test
-    public void testToken() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setToken("token");
-        assertThat(serviceConfig.getToken(), equalTo("token"));
-        serviceConfig.setToken((Boolean) null);
-        assertThat(serviceConfig.getToken(), nullValue());
-        serviceConfig.setToken(true);
-        assertThat(serviceConfig.getToken(), is("true"));
-    }
-
-    @Test
-    public void testDeprecated() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setDeprecated(true);
-        assertThat(serviceConfig.isDeprecated(), is(true));
-    }
-
-    @Test
-    public void testDynamic() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setDynamic(true);
-        assertThat(serviceConfig.isDynamic(), is(true));
-    }
-
-    @Test
-    public void testProtocol() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        assertThat(serviceConfig.getProtocol(), nullValue());
-        serviceConfig.setProtocol(new ProtocolConfig());
-        assertThat(serviceConfig.getProtocol(), notNullValue());
-        serviceConfig.setProtocols(Collections.singletonList(new ProtocolConfig()));
-        assertThat(serviceConfig.getProtocols(), hasSize(1));
-    }
-
-    @Test
-    public void testAccesslog() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setAccesslog("access.log");
-        assertThat(serviceConfig.getAccesslog(), equalTo("access.log"));
-        serviceConfig.setAccesslog((Boolean) null);
-        assertThat(serviceConfig.getAccesslog(), nullValue());
-        serviceConfig.setAccesslog(true);
-        assertThat(serviceConfig.getAccesslog(), equalTo("true"));
-    }
-
-    @Test
-    public void testExecutes() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setExecutes(10);
-        assertThat(serviceConfig.getExecutes(), equalTo(10));
-    }
-
-    @Test
-    public void testFilter() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setFilter("mockfilter");
-        assertThat(serviceConfig.getFilter(), equalTo("mockfilter"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        parameters.put(Constants.SERVICE_FILTER_KEY, "prefilter");
-        AbstractServiceConfig.appendParameters(parameters, serviceConfig);
-        assertThat(parameters, hasEntry(Constants.SERVICE_FILTER_KEY, "prefilter,mockfilter"));
-    }
-
-    @Test
-    public void testListener() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setListener("mockexporterlistener");
-        assertThat(serviceConfig.getListener(), equalTo("mockexporterlistener"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        parameters.put(Constants.EXPORTER_LISTENER_KEY, "prelistener");
-        AbstractServiceConfig.appendParameters(parameters, serviceConfig);
-        assertThat(parameters, hasEntry(Constants.EXPORTER_LISTENER_KEY, "prelistener,mockexporterlistener"));
-    }
-
-    @Test
-    public void testRegister() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setRegister(true);
-        assertThat(serviceConfig.isRegister(), is(true));
-    }
-
-    @Test
-    public void testWarmup() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setWarmup(100);
-        assertThat(serviceConfig.getWarmup(), equalTo(100));
-    }
-
-    @Test
-    public void testSerialization() throws Exception {
-        ServiceConfig serviceConfig = new ServiceConfig();
-        serviceConfig.setSerialization("serialization");
-        assertThat(serviceConfig.getSerialization(), equalTo("serialization"));
-    }
-
-
-    private static class ServiceConfig extends AbstractServiceConfig {
-
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java
deleted file mode 100644
index 1cc5a22..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config;
-
-import org.apache.dubbo.common.Constants;
-import org.junit.Test;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.contains;
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.hasEntry;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.sameInstance;
-import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
-import static org.junit.Assert.assertThat;
-
-public class ApplicationConfigTest {
-    @Test
-    public void testName() throws Exception {
-        ApplicationConfig application = new ApplicationConfig();
-        application.setName("app");
-        assertThat(application.getName(), equalTo("app"));
-        application = new ApplicationConfig("app2");
-        assertThat(application.getName(), equalTo("app2"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        ApplicationConfig.appendParameters(parameters, application);
-        assertThat(parameters, hasEntry(Constants.APPLICATION_KEY, "app2"));
-    }
-
-    @Test
-    public void testVersion() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setVersion("1.0.0");
-        assertThat(application.getVersion(), equalTo("1.0.0"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        ApplicationConfig.appendParameters(parameters, application);
-        assertThat(parameters, hasEntry("application.version", "1.0.0"));
-    }
-
-    @Test
-    public void testOwner() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setOwner("owner");
-        assertThat(application.getOwner(), equalTo("owner"));
-    }
-
-    @Test
-    public void testOrganization() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setOrganization("org");
-        assertThat(application.getOrganization(), equalTo("org"));
-    }
-
-    @Test
-    public void testArchitecture() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setArchitecture("arch");
-        assertThat(application.getArchitecture(), equalTo("arch"));
-    }
-
-    @Test
-    public void testEnvironment1() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setEnvironment("develop");
-        assertThat(application.getEnvironment(), equalTo("develop"));
-        application.setEnvironment("test");
-        assertThat(application.getEnvironment(), equalTo("test"));
-        application.setEnvironment("product");
-        assertThat(application.getEnvironment(), equalTo("product"));
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void testEnvironment2() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setEnvironment("illegal-env");
-    }
-
-    @Test
-    public void testRegistry() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        RegistryConfig registry = new RegistryConfig();
-        application.setRegistry(registry);
-        assertThat(application.getRegistry(), sameInstance(registry));
-        application.setRegistries(Collections.singletonList(registry));
-        assertThat(application.getRegistries(), contains(registry));
-        assertThat(application.getRegistries(), hasSize(1));
-    }
-
-    @Test
-    public void testMonitor() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setMonitor(new MonitorConfig("monitor-addr"));
-        assertThat(application.getMonitor().getAddress(), equalTo("monitor-addr"));
-        application.setMonitor("monitor-addr");
-        assertThat(application.getMonitor().getAddress(), equalTo("monitor-addr"));
-    }
-
-    @Test
-    public void testLogger() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setLogger("log4j");
-        assertThat(application.getLogger(), equalTo("log4j"));
-    }
-
-    @Test
-    public void testDefault() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setDefault(true);
-        assertThat(application.isDefault(), is(true));
-    }
-
-    @Test
-    public void testDumpDirectory() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setDumpDirectory("/dump");
-        assertThat(application.getDumpDirectory(), equalTo("/dump"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        ApplicationConfig.appendParameters(parameters, application);
-        assertThat(parameters, hasEntry(Constants.DUMP_DIRECTORY, "/dump"));
-    }
-
-    @Test
-    public void testQosEnable() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setQosEnable(true);
-        assertThat(application.getQosEnable(), is(true));
-        Map<String, String> parameters = new HashMap<String, String>();
-        ApplicationConfig.appendParameters(parameters, application);
-        assertThat(parameters, hasEntry(Constants.QOS_ENABLE, "true"));
-    }
-
-    @Test
-    public void testQosPort() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setQosPort(8080);
-        assertThat(application.getQosPort(), equalTo(8080));
-    }
-
-    @Test
-    public void testQosAcceptForeignIp() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setQosAcceptForeignIp(true);
-        assertThat(application.getQosAcceptForeignIp(), is(true));
-        Map<String, String> parameters = new HashMap<String, String>();
-        ApplicationConfig.appendParameters(parameters, application);
-        assertThat(parameters, hasEntry(Constants.ACCEPT_FOREIGN_IP, "true"));
-    }
-
-    @Test
-    public void testParameters() throws Exception {
-        ApplicationConfig application = new ApplicationConfig("app");
-        application.setQosAcceptForeignIp(true);
-        Map<String, String> parameters = new HashMap<String, String>();
-        parameters.put("k1", "v1");
-        ApplicationConfig.appendParameters(parameters, application);
-        assertThat(parameters, hasEntry("k1", "v1"));
-        assertThat(parameters, hasEntry(Constants.ACCEPT_FOREIGN_IP, "true"));
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ArgumentConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ArgumentConfigTest.java
deleted file mode 100644
index 26051f9..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ArgumentConfigTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config;
-
-import org.junit.Test;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.hasEntry;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
-public class ArgumentConfigTest {
-    @Test
-    public void testIndex() throws Exception {
-        ArgumentConfig argument = new ArgumentConfig();
-        argument.setIndex(1);
-        assertThat(argument.getIndex(), is(1));
-    }
-
-    @Test
-    public void testType() throws Exception {
-        ArgumentConfig argument = new ArgumentConfig();
-        argument.setType("int");
-        assertThat(argument.getType(), equalTo("int"));
-    }
-
-    @Test
-    public void testCallback() throws Exception {
-        ArgumentConfig argument = new ArgumentConfig();
-        argument.setCallback(true);
-        assertThat(argument.isCallback(), is(true));
-    }
-
-    @Test
-    public void testArguments() throws Exception {
-        ArgumentConfig argument = new ArgumentConfig();
-        argument.setIndex(1);
-        argument.setType("int");
-        argument.setCallback(true);
-        Map<String, String> parameters = new HashMap<String, String>();
-        AbstractServiceConfig.appendParameters(parameters, argument);
-        assertThat(parameters, hasEntry("callback", "true"));
-        assertThat(parameters.size(), is(1));
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ConsumerConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ConsumerConfigTest.java
deleted file mode 100644
index b9a1a9a..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ConsumerConfigTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config;
-
-import org.junit.Test;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
-public class ConsumerConfigTest {
-    @Test
-    public void testTimeout() throws Exception {
-        try {
-            System.clearProperty("sun.rmi.transport.tcp.responseTimeout");
-            ConsumerConfig consumer = new ConsumerConfig();
-            consumer.setTimeout(10);
-            assertThat(consumer.getTimeout(), is(10));
-            assertThat(System.getProperty("sun.rmi.transport.tcp.responseTimeout"), equalTo("10"));
-        } finally {
-            System.clearProperty("sun.rmi.transport.tcp.responseTimeout");
-        }
-    }
-
-    @Test
-    public void testDefault() throws Exception {
-        ConsumerConfig consumer = new ConsumerConfig();
-        consumer.setDefault(true);
-        assertThat(consumer.isDefault(), is(true));
-    }
-
-    @Test
-    public void testClient() throws Exception {
-        ConsumerConfig consumer = new ConsumerConfig();
-        consumer.setClient("client");
-        assertThat(consumer.getClient(), equalTo("client"));
-    }
-
-    @Test
-    public void testThreadpool() throws Exception {
-        ConsumerConfig consumer = new ConsumerConfig();
-        consumer.setThreadpool("fixed");
-        assertThat(consumer.getThreadpool(), equalTo("fixed"));
-    }
-
-    @Test
-    public void testCorethreads() throws Exception {
-        ConsumerConfig consumer = new ConsumerConfig();
-        consumer.setCorethreads(10);
-        assertThat(consumer.getCorethreads(), equalTo(10));
-    }
-
-    @Test
-    public void testThreads() throws Exception {
-        ConsumerConfig consumer = new ConsumerConfig();
-        consumer.setThreads(20);
-        assertThat(consumer.getThreads(), equalTo(20));
-    }
-
-    @Test
-    public void testQueues() throws Exception {
-        ConsumerConfig consumer = new ConsumerConfig();
-        consumer.setQueues(5);
-        assertThat(consumer.getQueues(), equalTo(5));
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/GenericServiceTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/GenericServiceTest.java
deleted file mode 100644
index f996f41..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/GenericServiceTest.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config;
-
-import org.apache.dubbo.common.Constants;
-import org.apache.dubbo.common.beanutil.JavaBeanAccessor;
-import org.apache.dubbo.common.beanutil.JavaBeanDescriptor;
-import org.apache.dubbo.common.beanutil.JavaBeanSerializeUtil;
-import org.apache.dubbo.common.extension.ExtensionLoader;
-import org.apache.dubbo.common.serialize.Serialization;
-import org.apache.dubbo.common.utils.ReflectUtils;
-import org.apache.dubbo.config.api.DemoException;
-import org.apache.dubbo.config.api.DemoService;
-import org.apache.dubbo.config.api.User;
-import org.apache.dubbo.config.provider.impl.DemoServiceImpl;
-import org.apache.dubbo.rpc.service.GenericException;
-import org.apache.dubbo.rpc.service.GenericService;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicReference;
-
-/**
- * GenericServiceTest
- */
-public class GenericServiceTest {
-
-    @Test
-    public void testGenericServiceException() {
-        ServiceConfig<GenericService> service = new ServiceConfig<GenericService>();
-        service.setApplication(new ApplicationConfig("generic-provider"));
-        service.setRegistry(new RegistryConfig("N/A"));
-        service.setProtocol(new ProtocolConfig("dubbo", 29581));
-        service.setInterface(DemoService.class.getName());
-        service.setRef(new GenericService() {
-
-            public Object $invoke(String method, String[] parameterTypes, Object[] args)
-                    throws GenericException {
-                if ("sayName".equals(method)) {
-                    return "Generic " + args[0];
-                }
-                if ("throwDemoException".equals(method)) {
-                    throw new GenericException(DemoException.class.getName(), "Generic");
-                }
-                if ("getUsers".equals(method)) {
-                    return args[0];
-                }
-                return null;
-            }
-        });
-        service.export();
-        try {
-            ReferenceConfig<DemoService> reference = new ReferenceConfig<DemoService>();
-            reference.setApplication(new ApplicationConfig("generic-consumer"));
-            reference.setInterface(DemoService.class);
-            reference.setUrl("dubbo://127.0.0.1:29581?generic=true&timeout=3000");
-            DemoService demoService = reference.get();
-            try {
-                // say name
-                Assert.assertEquals("Generic Haha", demoService.sayName("Haha"));
-                // get users
-                List<User> users = new ArrayList<User>();
-                users.add(new User("Aaa"));
-                users = demoService.getUsers(users);
-                Assert.assertEquals("Aaa", users.get(0).getName());
-                // throw demo exception
-                try {
-                    demoService.throwDemoException();
-                    Assert.fail();
-                } catch (DemoException e) {
-                    Assert.assertEquals("Generic", e.getMessage());
-                }
-            } finally {
-                reference.destroy();
-            }
-        } finally {
-            service.unexport();
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    @Test
-    public void testGenericReferenceException() {
-        ServiceConfig<DemoService> service = new ServiceConfig<DemoService>();
-        service.setApplication(new ApplicationConfig("generic-provider"));
-        service.setRegistry(new RegistryConfig("N/A"));
-        service.setProtocol(new ProtocolConfig("dubbo", 29581));
-        service.setInterface(DemoService.class.getName());
-        service.setRef(new DemoServiceImpl());
-        service.export();
-        try {
-            ReferenceConfig<GenericService> reference = new ReferenceConfig<GenericService>();
-            reference.setApplication(new ApplicationConfig("generic-consumer"));
-            reference.setInterface(DemoService.class);
-            reference.setUrl("dubbo://127.0.0.1:29581?scope=remote&timeout=3000");
-            reference.setGeneric(true);
-            GenericService genericService = reference.get();
-            try {
-                List<Map<String, Object>> users = new ArrayList<Map<String, Object>>();
-                Map<String, Object> user = new HashMap<String, Object>();
-                user.put("class", "org.apache.dubbo.config.api.User");
-                user.put("name", "actual.provider");
-                users.add(user);
-                users = (List<Map<String, Object>>) genericService.$invoke("getUsers", new String[]{List.class.getName()}, new Object[]{users});
-                Assert.assertEquals(1, users.size());
-                Assert.assertEquals("actual.provider", users.get(0).get("name"));
-            } finally {
-                reference.destroy();
-            }
-        } finally {
-            service.unexport();
-        }
-    }
-
-    @Test
-    public void testGenericSerializationJava() throws Exception {
-        ServiceConfig<DemoService> service = new ServiceConfig<DemoService>();
-        service.setApplication(new ApplicationConfig("generic-provider"));
-        service.setRegistry(new RegistryConfig("N/A"));
-        service.setProtocol(new ProtocolConfig("dubbo", 29581));
-        service.setInterface(DemoService.class.getName());
-        DemoServiceImpl ref = new DemoServiceImpl();
-        service.setRef(ref);
-        service.export();
-        try {
-            ReferenceConfig<GenericService> reference = new ReferenceConfig<GenericService>();
-            reference.setApplication(new ApplicationConfig("generic-consumer"));
-            reference.setInterface(DemoService.class);
-            reference.setUrl("dubbo://127.0.0.1:29581?scope=remote&timeout=3000");
-            reference.setGeneric(Constants.GENERIC_SERIALIZATION_NATIVE_JAVA);
-            GenericService genericService = reference.get();
-            try {
-                String name = "kimi";
-                ByteArrayOutputStream bos = new ByteArrayOutputStream(512);
-                ExtensionLoader.getExtensionLoader(Serialization.class)
-                        .getExtension("nativejava").serialize(null, bos).writeObject(name);
-                byte[] arg = bos.toByteArray();
-                Object obj = genericService.$invoke("sayName", new String[]{String.class.getName()}, new Object[]{arg});
-                Assert.assertTrue(obj instanceof byte[]);
-                byte[] result = (byte[]) obj;
-                Assert.assertEquals(ref.sayName(name), ExtensionLoader.getExtensionLoader(Serialization.class)
-                        .getExtension("nativejava").deserialize(null, new ByteArrayInputStream(result)).readObject().toString());
-
-                // getUsers
-                List<User> users = new ArrayList<User>();
-                User user = new User();
-                user.setName(name);
-                users.add(user);
-                bos = new ByteArrayOutputStream(512);
-                ExtensionLoader.getExtensionLoader(Serialization.class)
-                        .getExtension("nativejava").serialize(null, bos).writeObject(users);
-                obj = genericService.$invoke("getUsers",
-                        new String[]{List.class.getName()},
-                        new Object[]{bos.toByteArray()});
-                Assert.assertTrue(obj instanceof byte[]);
-                result = (byte[]) obj;
-                Assert.assertEquals(users,
-                        ExtensionLoader.getExtensionLoader(Serialization.class)
-                                .getExtension("nativejava")
-                                .deserialize(null, new ByteArrayInputStream(result))
-                                .readObject());
-
-                // echo(int)
-                bos = new ByteArrayOutputStream(512);
-                ExtensionLoader.getExtensionLoader(Serialization.class).getExtension("nativejava")
-                        .serialize(null, bos).writeObject(Integer.MAX_VALUE);
-                obj = genericService.$invoke("echo", new String[]{int.class.getName()}, new Object[]{bos.toByteArray()});
-                Assert.assertTrue(obj instanceof byte[]);
-                Assert.assertEquals(Integer.MAX_VALUE,
-                        ExtensionLoader.getExtensionLoader(Serialization.class)
-                                .getExtension("nativejava")
-                                .deserialize(null, new ByteArrayInputStream((byte[]) obj))
-                                .readObject());
-
-            } finally {
-                reference.destroy();
-            }
-        } finally {
-            service.unexport();
-        }
-    }
-
-    @Test
-    public void testGenericInvokeWithBeanSerialization() throws Exception {
-        ServiceConfig<DemoService> service = new ServiceConfig<DemoService>();
-        service.setApplication(new ApplicationConfig("bean-provider"));
-        service.setInterface(DemoService.class);
-        service.setRegistry(new RegistryConfig("N/A"));
-        DemoServiceImpl impl = new DemoServiceImpl();
-        service.setRef(impl);
-        service.setProtocol(new ProtocolConfig("dubbo", 29581));
-        service.export();
-        ReferenceConfig<GenericService> reference = null;
-        try {
-            reference = new ReferenceConfig<GenericService>();
-            reference.setApplication(new ApplicationConfig("bean-consumer"));
-            reference.setInterface(DemoService.class);
-            reference.setUrl("dubbo://127.0.0.1:29581?scope=remote&timeout=3000");
-            reference.setGeneric(Constants.GENERIC_SERIALIZATION_BEAN);
-            GenericService genericService = reference.get();
-            User user = new User();
-            user.setName("zhangsan");
-            List<User> users = new ArrayList<User>();
-            users.add(user);
-            Object result = genericService.$invoke("getUsers", new String[]{ReflectUtils.getName(List.class)}, new Object[]{JavaBeanSerializeUtil.serialize(users, JavaBeanAccessor.METHOD)});
-            Assert.assertTrue(result instanceof JavaBeanDescriptor);
-            JavaBeanDescriptor descriptor = (JavaBeanDescriptor) result;
-            Assert.assertTrue(descriptor.isCollectionType());
-            Assert.assertEquals(1, descriptor.propertySize());
-            descriptor = (JavaBeanDescriptor) descriptor.getProperty(0);
-            Assert.assertTrue(descriptor.isBeanType());
-            Assert.assertEquals(user.getName(), ((JavaBeanDescriptor) descriptor.getProperty("name")).getPrimitiveProperty());
-        } finally {
-            if (reference != null) {
-                reference.destroy();
-            }
-            service.unexport();
-        }
-    }
-
-    @Test
-    public void testGenericImplementationWithBeanSerialization() throws Exception {
-        final AtomicReference reference = new AtomicReference();
-        ServiceConfig<GenericService> service = new ServiceConfig<GenericService>();
-        service.setApplication(new ApplicationConfig("bean-provider"));
-        service.setRegistry(new RegistryConfig("N/A"));
-        service.setProtocol(new ProtocolConfig("dubbo", 29581));
-        service.setInterface(DemoService.class.getName());
-        service.setRef(new GenericService() {
-
-            public Object $invoke(String method, String[] parameterTypes, Object[] args) throws GenericException {
-                if ("getUsers".equals(method)) {
-                    GenericParameter arg = new GenericParameter();
-                    arg.method = method;
-                    arg.parameterTypes = parameterTypes;
-                    arg.arguments = args;
-                    reference.set(arg);
-                    return args[0];
-                }
-                if ("sayName".equals(method)) {
-                    return null;
-                }
-                return args;
-            }
-        });
-        service.export();
-        ReferenceConfig<DemoService> ref = null;
-        try {
-            ref = new ReferenceConfig<DemoService>();
-            ref.setApplication(new ApplicationConfig("bean-consumer"));
-            ref.setInterface(DemoService.class);
-            ref.setUrl("dubbo://127.0.0.1:29581?scope=remote&generic=bean&timeout=3000");
-            DemoService demoService = ref.get();
-            User user = new User();
-            user.setName("zhangsan");
-            List<User> users = new ArrayList<User>();
-            users.add(user);
-            List<User> result = demoService.getUsers(users);
-            Assert.assertEquals(users.size(), result.size());
-            Assert.assertEquals(user.getName(), result.get(0).getName());
-
-            GenericParameter gp = (GenericParameter) reference.get();
-            Assert.assertEquals("getUsers", gp.method);
-            Assert.assertEquals(1, gp.parameterTypes.length);
-            Assert.assertEquals(ReflectUtils.getName(List.class), gp.parameterTypes[0]);
-            Assert.assertEquals(1, gp.arguments.length);
-            Assert.assertTrue(gp.arguments[0] instanceof JavaBeanDescriptor);
-            JavaBeanDescriptor descriptor = (JavaBeanDescriptor) gp.arguments[0];
-            Assert.assertTrue(descriptor.isCollectionType());
-            Assert.assertEquals(ArrayList.class.getName(), descriptor.getClassName());
-            Assert.assertEquals(1, descriptor.propertySize());
-            descriptor = (JavaBeanDescriptor) descriptor.getProperty(0);
-            Assert.assertTrue(descriptor.isBeanType());
-            Assert.assertEquals(User.class.getName(), descriptor.getClassName());
-            Assert.assertEquals(user.getName(), ((JavaBeanDescriptor) descriptor.getProperty("name")).getPrimitiveProperty());
-            Assert.assertNull(demoService.sayName("zhangsan"));
-        } finally {
-            if (ref != null) {
-                ref.destroy();
-            }
-            service.unexport();
-        }
-    }
-
-    protected static class GenericParameter {
-
-        String method;
-
-        String[] parameterTypes;
-
-        Object[] arguments;
-    }
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/MethodConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/MethodConfigTest.java
deleted file mode 100644
index 8f7e860..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/MethodConfigTest.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config;
-
-import org.apache.dubbo.common.Constants;
-import org.hamcrest.Matchers;
-import org.junit.Test;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.contains;
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.hasEntry;
-import static org.hamcrest.Matchers.hasKey;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.not;
-import static org.junit.Assert.assertThat;
-
-public class MethodConfigTest {
-    @Test
-    public void testName() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setName("hello");
-        assertThat(method.getName(), equalTo("hello"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        MethodConfig.appendParameters(parameters, method);
-        assertThat(parameters, not(hasKey("name")));
-    }
-
-    @Test
-    public void testStat() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setStat(10);
-        assertThat(method.getStat(), equalTo(10));
-    }
-
-    @Test
-    public void testRetry() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setRetry(true);
-        assertThat(method.isRetry(), is(true));
-    }
-
-    @Test
-    public void testReliable() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setReliable(true);
-        assertThat(method.isReliable(), is(true));
-    }
-
-    @Test
-    public void testExecutes() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setExecutes(10);
-        assertThat(method.getExecutes(), equalTo(10));
-    }
-
-    @Test
-    public void testDeprecated() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setDeprecated(true);
-        assertThat(method.getDeprecated(), is(true));
-    }
-
-    @Test
-    public void testArguments() throws Exception {
-        MethodConfig method = new MethodConfig();
-        ArgumentConfig argument = new ArgumentConfig();
-        method.setArguments(Collections.singletonList(argument));
-        assertThat(method.getArguments(), contains(argument));
-        assertThat(method.getArguments(), Matchers.<ArgumentConfig>hasSize(1));
-    }
-
-    @Test
-    public void testSticky() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setSticky(true);
-        assertThat(method.getSticky(), is(true));
-    }
-
-    @Test
-    public void testOnreturn() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setOnreturn("on-return-object");
-        assertThat(method.getOnreturn(), equalTo((Object) "on-return-object"));
-        Map<String, Object> attribute = new HashMap<String, Object>();
-        MethodConfig.appendAttributes(attribute, method);
-        assertThat(attribute, hasEntry((Object) Constants.ON_RETURN_INSTANCE_KEY, (Object) "on-return-object"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        MethodConfig.appendParameters(parameters, method);
-        assertThat(parameters.size(), is(0));
-    }
-
-    @Test
-    public void testOnreturnMethod() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setOnreturnMethod("on-return-method");
-        assertThat(method.getOnreturnMethod(), equalTo("on-return-method"));
-        Map<String, Object> attribute = new HashMap<String, Object>();
-        MethodConfig.appendAttributes(attribute, method);
-        assertThat(attribute, hasEntry((Object) Constants.ON_RETURN_METHOD_KEY, (Object) "on-return-method"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        MethodConfig.appendParameters(parameters, method);
-        assertThat(parameters.size(), is(0));
-    }
-
-    @Test
-    public void testOnthrow() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setOnthrow("on-throw-object");
-        assertThat(method.getOnthrow(), equalTo((Object) "on-throw-object"));
-        Map<String, Object> attribute = new HashMap<String, Object>();
-        MethodConfig.appendAttributes(attribute, method);
-        assertThat(attribute, hasEntry((Object) Constants.ON_THROW_INSTANCE_KEY, (Object) "on-throw-object"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        MethodConfig.appendParameters(parameters, method);
-        assertThat(parameters.size(), is(0));
-    }
-
-    @Test
-    public void testOnthrowMethod() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setOnthrowMethod("on-throw-method");
-        assertThat(method.getOnthrowMethod(), equalTo("on-throw-method"));
-        Map<String, Object> attribute = new HashMap<String, Object>();
-        MethodConfig.appendAttributes(attribute, method);
-        assertThat(attribute, hasEntry((Object) Constants.ON_THROW_METHOD_KEY, (Object) "on-throw-method"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        MethodConfig.appendParameters(parameters, method);
-        assertThat(parameters.size(), is(0));
-    }
-
-    @Test
-    public void testOninvoke() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setOninvoke("on-invoke-object");
-        assertThat(method.getOninvoke(), equalTo((Object) "on-invoke-object"));
-        Map<String, Object> attribute = new HashMap<String, Object>();
-        MethodConfig.appendAttributes(attribute, method);
-        assertThat(attribute, hasEntry((Object) Constants.ON_INVOKE_INSTANCE_KEY, (Object) "on-invoke-object"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        MethodConfig.appendParameters(parameters, method);
-        assertThat(parameters.size(), is(0));
-    }
-
-    @Test
-    public void testOninvokeMethod() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setOninvokeMethod("on-invoke-method");
-        assertThat(method.getOninvokeMethod(), equalTo("on-invoke-method"));
-        Map<String, Object> attribute = new HashMap<String, Object>();
-        MethodConfig.appendAttributes(attribute, method);
-        assertThat(attribute, hasEntry((Object) Constants.ON_INVOKE_METHOD_KEY, (Object) "on-invoke-method"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        MethodConfig.appendParameters(parameters, method);
-        assertThat(parameters.size(), is(0));
-    }
-
-    @Test
-    public void testReturn() throws Exception {
-        MethodConfig method = new MethodConfig();
-        method.setReturn(true);
-        assertThat(method.isReturn(), is(true));
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ModuleConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ModuleConfigTest.java
deleted file mode 100644
index c535e99..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ModuleConfigTest.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config;
-
-import org.hamcrest.Matchers;
-import org.junit.Test;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.contains;
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.hasEntry;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.sameInstance;
-import static org.junit.Assert.assertThat;
-
-public class ModuleConfigTest {
-    @Test(expected = IllegalStateException.class)
-    public void testName1() throws Exception {
-        ModuleConfig module = new ModuleConfig();
-        Map<String, String> parameters = new HashMap<String, String>();
-        ModuleConfig.appendParameters(parameters, module);
-    }
-
-    @Test
-    public void testName2() throws Exception {
-        ModuleConfig module = new ModuleConfig();
-        module.setName("module-name");
-        assertThat(module.getName(), equalTo("module-name"));
-        assertThat(module.getId(), equalTo("module-name"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        ModuleConfig.appendParameters(parameters, module);
-        assertThat(parameters, hasEntry("module", "module-name"));
-    }
-
-    @Test
-    public void testVersion() throws Exception {
-        ModuleConfig module = new ModuleConfig();
-        module.setName("module-name");
-        module.setVersion("1.0.0");
-        assertThat(module.getVersion(), equalTo("1.0.0"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        ModuleConfig.appendParameters(parameters, module);
-        assertThat(parameters, hasEntry("module.version", "1.0.0"));
-    }
-
-    @Test
-    public void testOwner() throws Exception {
-        ModuleConfig module = new ModuleConfig();
-        module.setOwner("owner");
-        assertThat(module.getOwner(), equalTo("owner"));
-    }
-
-    @Test
-    public void testOrganization() throws Exception {
-        ModuleConfig module = new ModuleConfig();
-        module.setOrganization("org");
-        assertThat(module.getOrganization(), equalTo("org"));
-    }
-
-    @Test
-    public void testRegistry() throws Exception {
-        ModuleConfig module = new ModuleConfig();
-        RegistryConfig registry = new RegistryConfig();
-        module.setRegistry(registry);
-        assertThat(module.getRegistry(), sameInstance(registry));
-    }
-
-    @Test
-    public void testRegistries() throws Exception {
-        ModuleConfig module = new ModuleConfig();
-        RegistryConfig registry = new RegistryConfig();
-        module.setRegistries(Collections.singletonList(registry));
-        assertThat(module.getRegistries(), Matchers.<RegistryConfig>hasSize(1));
-        assertThat(module.getRegistries(), contains(registry));
-    }
-
-    @Test
-    public void testMonitor() throws Exception {
-        ModuleConfig module = new ModuleConfig();
-        module.setMonitor("monitor-addr1");
-        assertThat(module.getMonitor().getAddress(), equalTo("monitor-addr1"));
-        module.setMonitor(new MonitorConfig("monitor-addr2"));
-        assertThat(module.getMonitor().getAddress(), equalTo("monitor-addr2"));
-    }
-
-    @Test
-    public void testDefault() throws Exception {
-        ModuleConfig module = new ModuleConfig();
-        module.setDefault(true);
-        assertThat(module.isDefault(), is(true));
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/MonitorConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/MonitorConfigTest.java
deleted file mode 100644
index c666072..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/MonitorConfigTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config;
-
-import org.junit.Test;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.hasEntry;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
-public class MonitorConfigTest {
-    @Test
-    public void testAddress() throws Exception {
-        MonitorConfig monitor = new MonitorConfig();
-        monitor.setAddress("monitor-addr");
-        assertThat(monitor.getAddress(), equalTo("monitor-addr"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        MonitorConfig.appendParameters(parameters, monitor);
-        assertThat(parameters.isEmpty(), is(true));
-    }
-
-    @Test
-    public void testProtocol() throws Exception {
-        MonitorConfig monitor = new MonitorConfig();
-        monitor.setProtocol("protocol");
-        assertThat(monitor.getProtocol(), equalTo("protocol"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        MonitorConfig.appendParameters(parameters, monitor);
-        assertThat(parameters.isEmpty(), is(true));
-    }
-
-    @Test
-    public void testUsername() throws Exception {
-        MonitorConfig monitor = new MonitorConfig();
-        monitor.setUsername("user");
-        assertThat(monitor.getUsername(), equalTo("user"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        MonitorConfig.appendParameters(parameters, monitor);
-        assertThat(parameters.isEmpty(), is(true));
-    }
-
-    @Test
-    public void testPassword() throws Exception {
-        MonitorConfig monitor = new MonitorConfig();
-        monitor.setPassword("secret");
-        assertThat(monitor.getPassword(), equalTo("secret"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        MonitorConfig.appendParameters(parameters, monitor);
-        assertThat(parameters.isEmpty(), is(true));
-    }
-
-    @Test
-    public void testGroup() throws Exception {
-        MonitorConfig monitor = new MonitorConfig();
-        monitor.setGroup("group");
-        assertThat(monitor.getGroup(), equalTo("group"));
-    }
-
-    @Test
-    public void testVersion() throws Exception {
-        MonitorConfig monitor = new MonitorConfig();
-        monitor.setVersion("1.0.0");
-        assertThat(monitor.getVersion(), equalTo("1.0.0"));
-    }
-
-    @Test
-    public void testParameters() throws Exception {
-        MonitorConfig monitor = new MonitorConfig();
-        Map<String, String> parameters = Collections.singletonMap("k1", "v1");
-        monitor.setParameters(parameters);
-        assertThat(monitor.getParameters(), hasEntry("k1", "v1"));
-    }
-
-    @Test
-    public void testDefault() throws Exception {
-        MonitorConfig monitor = new MonitorConfig();
-        monitor.setDefault(true);
-        assertThat(monitor.isDefault(), is(true));
-    }
-
-    @Test
-    public void testInterval() throws Exception {
-        MonitorConfig monitor = new MonitorConfig();
-        monitor.setInterval("100");
-        assertThat(monitor.getInterval(), equalTo("100"));
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ProtocolConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ProtocolConfigTest.java
deleted file mode 100644
index 04c5a43..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ProtocolConfigTest.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config;
-
-import org.apache.dubbo.config.mock.MockProtocol2;
-import org.apache.dubbo.rpc.Protocol;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.hasEntry;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
-public class ProtocolConfigTest {
-
-    @Test
-    public void testDestroy() throws Exception {
-        Protocol protocol = Mockito.mock(Protocol.class);
-        MockProtocol2.delegate = protocol;
-        ProtocolConfig protocolConfig = new ProtocolConfig();
-        protocolConfig.setName("mockprotocol2");
-        protocolConfig.destroy();
-        Mockito.verify(protocol).destroy();
-    }
-
-    @Test
-    public void testName() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setName("name");
-        Map<String, String> parameters = new HashMap<String, String>();
-        ProtocolConfig.appendParameters(parameters, protocol);
-        assertThat(protocol.getName(), equalTo("name"));
-        assertThat(protocol.getId(), equalTo("name"));
-        assertThat(parameters.isEmpty(), is(true));
-    }
-
-    @Test
-    public void testHost() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setHost("host");
-        Map<String, String> parameters = new HashMap<String, String>();
-        ProtocolConfig.appendParameters(parameters, protocol);
-        assertThat(protocol.getHost(), equalTo("host"));
-        assertThat(parameters.isEmpty(), is(true));
-    }
-
-    @Test
-    public void testPort() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setPort(8080);
-        Map<String, String> parameters = new HashMap<String, String>();
-        ProtocolConfig.appendParameters(parameters, protocol);
-        assertThat(protocol.getPort(), equalTo(8080));
-        assertThat(parameters.isEmpty(), is(true));
-    }
-
-    @Test
-    public void testPath() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setContextpath("context-path");
-        Map<String, String> parameters = new HashMap<String, String>();
-        ProtocolConfig.appendParameters(parameters, protocol);
-        assertThat(protocol.getPath(), equalTo("context-path"));
-        assertThat(protocol.getContextpath(), equalTo("context-path"));
-        assertThat(parameters.isEmpty(), is(true));
-        protocol.setPath("path");
-        assertThat(protocol.getPath(), equalTo("path"));
-        assertThat(protocol.getContextpath(), equalTo("path"));
-    }
-
-    @Test
-    public void testCorethreads() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setCorethreads(10);
-        assertThat(protocol.getCorethreads(), is(10));
-    }
-
-    @Test
-    public void testThreads() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setThreads(10);
-        assertThat(protocol.getThreads(), is(10));
-    }
-
-    @Test
-    public void testIothreads() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setIothreads(10);
-        assertThat(protocol.getIothreads(), is(10));
-    }
-
-    @Test
-    public void testQueues() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setQueues(10);
-        assertThat(protocol.getQueues(), is(10));
-    }
-
-    @Test
-    public void testAccepts() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setAccepts(10);
-        assertThat(protocol.getAccepts(), is(10));
-    }
-
-    @Test
-    public void testCodec() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setName("dubbo");
-        protocol.setCodec("mockcodec");
-        assertThat(protocol.getCodec(), equalTo("mockcodec"));
-    }
-
-    @Test
-    public void testAccesslog() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setAccesslog("access.log");
-        assertThat(protocol.getAccesslog(), equalTo("access.log"));
-    }
-
-    @Test
-    public void testTelnet() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setTelnet("mocktelnethandler");
-        assertThat(protocol.getTelnet(), equalTo("mocktelnethandler"));
-    }
-
-    @Test
-    public void testRegister() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setRegister(true);
-        assertThat(protocol.isRegister(), is(true));
-    }
-
-    @Test
-    public void testTransporter() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setTransporter("mocktransporter");
-        assertThat(protocol.getTransporter(), equalTo("mocktransporter"));
-    }
-
-    @Test
-    public void testExchanger() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setExchanger("mockexchanger");
-        assertThat(protocol.getExchanger(), equalTo("mockexchanger"));
-    }
-
-    @Test
-    public void testDispatcher() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setDispatcher("mockdispatcher");
-        assertThat(protocol.getDispatcher(), equalTo("mockdispatcher"));
-    }
-
-    @Test
-    public void testNetworker() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setNetworker("networker");
-        assertThat(protocol.getNetworker(), equalTo("networker"));
-    }
-
-    @Test
-    public void testParameters() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setParameters(Collections.singletonMap("k1", "v1"));
-        assertThat(protocol.getParameters(), hasEntry("k1", "v1"));
-    }
-
-    @Test
-    public void testDefault() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setDefault(true);
-        assertThat(protocol.isDefault(), is(true));
-    }
-
-    @Test
-    public void testKeepAlive() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setKeepAlive(true);
-        assertThat(protocol.getKeepAlive(), is(true));
-    }
-
-    @Test
-    public void testOptimizer() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setOptimizer("optimizer");
-        assertThat(protocol.getOptimizer(), equalTo("optimizer"));
-    }
-
-    @Test
-    public void testExtension() throws Exception {
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setExtension("extension");
-        assertThat(protocol.getExtension(), equalTo("extension"));
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ProviderConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ProviderConfigTest.java
deleted file mode 100644
index 18c630a..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ProviderConfigTest.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config;
-
-import org.junit.Test;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.hasEntry;
-import static org.hamcrest.Matchers.hasKey;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.not;
-import static org.junit.Assert.assertThat;
-
-public class ProviderConfigTest {
-    @Test
-    public void testProtocol() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setProtocol("protocol");
-        assertThat(provider.getProtocol().getName(), equalTo("protocol"));
-    }
-
-    @Test
-    public void testDefault() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setDefault(true);
-        Map<String, String> parameters = new HashMap<String, String>();
-        ProviderConfig.appendParameters(parameters, provider);
-        assertThat(provider.isDefault(), is(true));
-        assertThat(parameters, not(hasKey("default")));
-    }
-
-    @Test
-    public void testHost() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setHost("demo-host");
-        Map<String, String> parameters = new HashMap<String, String>();
-        ProviderConfig.appendParameters(parameters, provider);
-        assertThat(provider.getHost(), equalTo("demo-host"));
-        assertThat(parameters, not(hasKey("host")));
-    }
-
-    @Test
-    public void testPort() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setPort(8080);
-        Map<String, String> parameters = new HashMap<String, String>();
-        ProviderConfig.appendParameters(parameters, provider);
-        assertThat(provider.getPort(), is(8080));
-        assertThat(parameters, not(hasKey("port")));
-    }
-
-    @Test
-    public void testPath() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setPath("/path");
-        Map<String, String> parameters = new HashMap<String, String>();
-        ProviderConfig.appendParameters(parameters, provider);
-        assertThat(provider.getPath(), equalTo("/path"));
-        assertThat(provider.getContextpath(), equalTo("/path"));
-        assertThat(parameters, not(hasKey("path")));
-    }
-
-    @Test
-    public void testContextPath() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setContextpath("/context-path");
-        Map<String, String> parameters = new HashMap<String, String>();
-        ProviderConfig.appendParameters(parameters, provider);
-        assertThat(provider.getContextpath(), equalTo("/context-path"));
-        assertThat(parameters, not(hasKey("/context-path")));
-    }
-
-    @Test
-    public void testThreadpool() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setThreadpool("mockthreadpool");
-        assertThat(provider.getThreadpool(), equalTo("mockthreadpool"));
-    }
-
-    @Test
-    public void testThreads() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setThreads(10);
-        assertThat(provider.getThreads(), is(10));
-    }
-
-    @Test
-    public void testIothreads() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setIothreads(10);
-        assertThat(provider.getIothreads(), is(10));
-    }
-
-    @Test
-    public void testQueues() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setQueues(10);
-        assertThat(provider.getQueues(), is(10));
-    }
-
-    @Test
-    public void testAccepts() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setAccepts(10);
-        assertThat(provider.getAccepts(), is(10));
-    }
-
-    @Test
-    public void testCharset() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setCharset("utf-8");
-        assertThat(provider.getCharset(), equalTo("utf-8"));
-    }
-
-    @Test
-    public void testPayload() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setPayload(10);
-        assertThat(provider.getPayload(), is(10));
-    }
-
-    @Test
-    public void testBuffer() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setBuffer(10);
-        assertThat(provider.getBuffer(), is(10));
-    }
-
-    @Test
-    public void testServer() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setServer("demo-server");
-        assertThat(provider.getServer(), equalTo("demo-server"));
-    }
-
-    @Test
-    public void testClient() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setClient("client");
-        assertThat(provider.getClient(), equalTo("client"));
-    }
-
-    @Test
-    public void testTelnet() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setTelnet("mocktelnethandler");
-        assertThat(provider.getTelnet(), equalTo("mocktelnethandler"));
-    }
-
-    @Test
-    public void testPrompt() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setPrompt("#");
-        Map<String, String> parameters = new HashMap<String, String>();
-        ProviderConfig.appendParameters(parameters, provider);
-        assertThat(provider.getPrompt(), equalTo("#"));
-        assertThat(parameters, hasEntry("prompt", "%23"));
-    }
-
-    @Test
-    public void testStatus() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setStatus("mockstatuschecker");
-        assertThat(provider.getStatus(), equalTo("mockstatuschecker"));
-    }
-
-    @Test
-    public void testTransporter() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setTransporter("mocktransporter");
-        assertThat(provider.getTransporter(), equalTo("mocktransporter"));
-    }
-
-    @Test
-    public void testExchanger() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setExchanger("mockexchanger");
-        assertThat(provider.getExchanger(), equalTo("mockexchanger"));
-    }
-
-    @Test
-    public void testDispatcher() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setDispatcher("mockdispatcher");
-        assertThat(provider.getDispatcher(), equalTo("mockdispatcher"));
-    }
-
-    @Test
-    public void testNetworker() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setNetworker("networker");
-        assertThat(provider.getNetworker(), equalTo("networker"));
-    }
-
-    @Test
-    public void testWait() throws Exception {
-        ProviderConfig provider = new ProviderConfig();
-        provider.setWait(10);
-        assertThat(provider.getWait(), equalTo(10));
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java
deleted file mode 100644
index c8cb048..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config;
-
-import org.apache.dubbo.common.Constants;
-import org.apache.dubbo.config.api.DemoService;
-import org.apache.dubbo.config.provider.impl.DemoServiceImpl;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class ReferenceConfigTest {
-
-    @Test
-    public void testInjvm() throws Exception {
-        ApplicationConfig application = new ApplicationConfig();
-        application.setName("test-protocol-random-port");
-
-        RegistryConfig registry = new RegistryConfig();
-        registry.setAddress("multicast://224.5.6.7:1234");
-
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setName("dubbo");
-
-        ServiceConfig<DemoService> demoService;
-        demoService = new ServiceConfig<DemoService>();
-        demoService.setInterface(DemoService.class);
-        demoService.setRef(new DemoServiceImpl());
-        demoService.setApplication(application);
-        demoService.setRegistry(registry);
-        demoService.setProtocol(protocol);
-
-        ReferenceConfig<DemoService> rc = new ReferenceConfig<DemoService>();
-        rc.setApplication(application);
-        rc.setRegistry(registry);
-        rc.setInterface(DemoService.class.getName());
-        rc.setInjvm(false);
-
-        try {
-            demoService.export();
-            rc.get();
-            Assert.assertTrue(!Constants.LOCAL_PROTOCOL.equalsIgnoreCase(
-                    rc.getInvoker().getUrl().getProtocol()));
-        } finally {
-            demoService.unexport();
-        }
-    }
-    /**
-     * unit test for dubbo-1765
-     */
-    @Test
-    public void testReferenceRetry() {
-        ApplicationConfig application = new ApplicationConfig();
-        application.setName("test-reference-retry");
-        RegistryConfig registry = new RegistryConfig();
-        registry.setAddress("multicast://224.5.6.7:1234");
-        ProtocolConfig protocol = new ProtocolConfig();
-        protocol.setName("dubbo");
-
-        ReferenceConfig<DemoService> rc = new ReferenceConfig<DemoService>();
-        rc.setApplication(application);
-        rc.setRegistry(registry);
-        rc.setInterface(DemoService.class.getName());
-
-        boolean success = false;
-        DemoService demoService = null;
-        try {
-            demoService = rc.get();
-            success = true;
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        Assert.assertFalse(success);
-        Assert.assertNull(demoService);
-
-        ServiceConfig<DemoService> sc = new ServiceConfig<DemoService>();
-        sc.setInterface(DemoService.class);
-        sc.setRef(new DemoServiceImpl());
-        sc.setApplication(application);
-        sc.setRegistry(registry);
-        sc.setProtocol(protocol);
-
-        try {
-            sc.export();
-            demoService = rc.get();
-            success = true;
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        Assert.assertTrue(success);
-        Assert.assertNotNull(demoService);
-
-    }
-}
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/RegistryConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/RegistryConfigTest.java
deleted file mode 100644
index 75c99b1..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/RegistryConfigTest.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config;
-
-import org.apache.dubbo.common.Constants;
-import org.junit.Test;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.hasEntry;
-import static org.hamcrest.Matchers.hasKey;
-import static org.hamcrest.Matchers.not;
-import static org.junit.Assert.assertThat;
-
-public class RegistryConfigTest {
-    @Test
-    public void testProtocol() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setProtocol("protocol");
-        assertThat(registry.getProtocol(), equalTo(registry.getProtocol()));
-    }
-
-    @Test
-    public void testAddress() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setAddress("localhost");
-        assertThat(registry.getAddress(), equalTo("localhost"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        RegistryConfig.appendParameters(parameters, registry);
-        assertThat(parameters, not(hasKey("address")));
-    }
-
-    @Test
-    public void testUsername() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setUsername("username");
-        assertThat(registry.getUsername(), equalTo("username"));
-    }
-
-    @Test
-    public void testPassword() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setPassword("password");
-        assertThat(registry.getPassword(), equalTo("password"));
-    }
-
-    @Test
-    public void testWait() throws Exception {
-        try {
-            RegistryConfig registry = new RegistryConfig();
-            registry.setWait(10);
-            assertThat(registry.getWait(), is(10));
-            assertThat(System.getProperty(Constants.SHUTDOWN_WAIT_KEY), equalTo("10"));
-        } finally {
-            System.clearProperty(Constants.SHUTDOWN_TIMEOUT_KEY);
-        }
-    }
-
-    @Test
-    public void testCheck() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setCheck(true);
-        assertThat(registry.isCheck(), is(true));
-    }
-
-    @Test
-    public void testFile() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setFile("file");
-        assertThat(registry.getFile(), equalTo("file"));
-    }
-
-    @Test
-    public void testTransporter() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setTransporter("transporter");
-        assertThat(registry.getTransporter(), equalTo("transporter"));
-    }
-
-    @Test
-    public void testClient() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setClient("client");
-        assertThat(registry.getClient(), equalTo("client"));
-    }
-
-    @Test
-    public void testTimeout() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setTimeout(10);
-        assertThat(registry.getTimeout(), is(10));
-    }
-
-    @Test
-    public void testSession() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setSession(10);
-        assertThat(registry.getSession(), is(10));
-    }
-
-    @Test
-    public void testDynamic() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setDynamic(true);
-        assertThat(registry.isDynamic(), is(true));
-    }
-
-    @Test
-    public void testRegister() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setRegister(true);
-        assertThat(registry.isRegister(), is(true));
-    }
-
-    @Test
-    public void testSubscribe() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setSubscribe(true);
-        assertThat(registry.isSubscribe(), is(true));
-    }
-
-    @Test
-    public void testCluster() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setCluster("cluster");
-        assertThat(registry.getCluster(), equalTo("cluster"));
-    }
-
-    @Test
-    public void testGroup() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setGroup("group");
-        assertThat(registry.getGroup(), equalTo("group"));
-    }
-
-    @Test
-    public void testVersion() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setVersion("1.0.0");
-        assertThat(registry.getVersion(), equalTo("1.0.0"));
-    }
-
-    @Test
-    public void testParameters() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setParameters(Collections.singletonMap("k1", "v1"));
-        assertThat(registry.getParameters(), hasEntry("k1", "v1"));
-        Map<String, String> parameters = new HashMap<String, String>();
-        RegistryConfig.appendParameters(parameters, registry);
-        assertThat(parameters, hasEntry("k1", "v1"));
-    }
-
-    @Test
-    public void testDefault() throws Exception {
-        RegistryConfig registry = new RegistryConfig();
-        registry.setDefault(true);
-        assertThat(registry.isDefault(), is(true));
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ServiceConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ServiceConfigTest.java
deleted file mode 100644
index 5da2b46..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ServiceConfigTest.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config;
-
-import org.apache.dubbo.common.Constants;
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.config.api.DemoService;
-import org.apache.dubbo.config.api.Greeting;
-import org.apache.dubbo.config.mock.TestProxyFactory;
-import org.apache.dubbo.config.provider.impl.DemoServiceImpl;
-import org.apache.dubbo.config.mock.MockProtocol2;
-import org.apache.dubbo.config.mock.MockRegistryFactory2;
-import org.apache.dubbo.registry.Registry;
-import org.apache.dubbo.rpc.Exporter;
-import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.Protocol;
-import org.apache.dubbo.rpc.service.GenericService;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import java.util.Collections;
-
-import static org.apache.dubbo.common.Constants.GENERIC_SERIALIZATION_BEAN;
-import static org.apache.dubbo.common.Constants.GENERIC_SERIALIZATION_DEFAULT;
-import static org.apache.dubbo.common.Constants.GENERIC_SERIALIZATION_NATIVE_JAVA;
-import static org.hamcrest.CoreMatchers.containsString;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.Matchers.hasEntry;
-import static org.hamcrest.Matchers.hasKey;
-import static org.hamcrest.Matchers.hasSize;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
-import static org.mockito.Mockito.withSettings;
-
-public class ServiceConfigTest {
-    private Protocol protocolDelegate = Mockito.mock(Protocol.class);
-    private Registry registryDelegate = Mockito.mock(Registry.class);
-    private Exporter exporter = Mockito.mock(Exporter.class);
-    private ServiceConfig<DemoServiceImpl> service = new ServiceConfig<DemoServiceImpl>();
-    private ServiceConfig<DemoServiceImpl> service2 = new ServiceConfig<DemoServiceImpl>();
-
-
-    @Before
-    public void setUp() throws Exception {
-        MockProtocol2.delegate = protocolDelegate;
-        MockRegistryFactory2.registry = registryDelegate;
-        Mockito.when(protocolDelegate.export(Mockito.any(Invoker.class))).thenReturn(exporter);
-
-        ApplicationConfig app = new ApplicationConfig("app");
-
-        ProtocolConfig protocolConfig = new ProtocolConfig();
-        protocolConfig.setName("mockprotocol2");
-
-        ProviderConfig provider = new ProviderConfig();
-        provider.setExport(true);
-        provider.setProtocol(protocolConfig);
-
-        RegistryConfig registry = new RegistryConfig();
-        registry.setProtocol("mockprotocol2");
-
-        ArgumentConfig argument = new ArgumentConfig();
-        argument.setIndex(0);
-        argument.setCallback(false);
-
-        MethodConfig method = new MethodConfig();
-        method.setName("echo");
-        method.setArguments(Collections.singletonList(argument));
-
-        service.setProvider(provider);
-        service.setApplication(app);
-        service.setRegistry(registry);
-        service.setInterface(DemoService.class);
-        service.setRef(new DemoServiceImpl());
-        service.setMethods(Collections.singletonList(method));
-
-        service2.setProvider(provider);
-        service2.setApplication(app);
-        service2.setRegistry(registry);
-        service2.setInterface(DemoService.class);
-        service2.setRef(new DemoServiceImpl());
-        service2.setMethods(Collections.singletonList(method));
-        service2.setProxy("testproxyfactory");
-    }
-
-    @Test
-    public void testExport() throws Exception {
-        service.export();
-
-        assertThat(service.getExportedUrls(), hasSize(1));
-        URL url = service.toUrl();
-        assertThat(url.getProtocol(), equalTo("mockprotocol2"));
-        assertThat(url.getPath(), equalTo(DemoService.class.getName()));
-        assertThat(url.getParameters(), hasEntry(Constants.ANYHOST_KEY, "true"));
-        assertThat(url.getParameters(), hasEntry(Constants.APPLICATION_KEY, "app"));
-        assertThat(url.getParameters(), hasKey(Constants.BIND_IP_KEY));
-        assertThat(url.getParameters(), hasKey(Constants.BIND_PORT_KEY));
-        assertThat(url.getParameters(), hasEntry(Constants.DEFAULT_KEY + "." + Constants.EXPORT_KEY, "true"));
-        assertThat(url.getParameters(), hasEntry(Constants.EXPORT_KEY, "true"));
-        assertThat(url.getParameters(), hasEntry("echo.0.callback", "false"));
-        assertThat(url.getParameters(), hasEntry(Constants.GENERIC_KEY, "false"));
-        assertThat(url.getParameters(), hasEntry(Constants.INTERFACE_KEY, DemoService.class.getName()));
-        assertThat(url.getParameters(), hasKey(Constants.METHODS_KEY));
-        assertThat(url.getParameters().get(Constants.METHODS_KEY), containsString("echo"));
-        assertThat(url.getParameters(), hasEntry(Constants.SIDE_KEY, Constants.PROVIDER));
-        Mockito.verify(protocolDelegate).export(Mockito.any(Invoker.class));
-    }
-
-    @Test
-    public void testProxy() throws Exception {
-        service2.export();
-
-        assertThat(service2.getExportedUrls(), hasSize(1));
-        assertEquals(2, TestProxyFactory.count); // local injvm and registry protocol, so expected is 2
-    }
-
-    @Test
-    @Ignore("cannot pass in travis")
-    public void testUnexport() throws Exception {
-        System.setProperty(Constants.SHUTDOWN_WAIT_KEY, "0");
-        try {
-            service.export();
-            service.unexport();
-            Thread.sleep(1000);
-            Mockito.verify(exporter, Mockito.atLeastOnce()).unexport();
-        } finally {
-            System.clearProperty(Constants.SHUTDOWN_TIMEOUT_KEY);
-        }
-    }
-
-    @Test
-    public void testInterfaceClass() throws Exception {
-        ServiceConfig<Greeting> service = new ServiceConfig<Greeting>();
-        service.setInterface(Greeting.class.getName());
-        service.setRef(Mockito.mock(Greeting.class));
-        assertThat(service.getInterfaceClass() == Greeting.class, is(true));
-        service = new ServiceConfig<Greeting>();
-        service.setRef(Mockito.mock(Greeting.class, withSettings().extraInterfaces(GenericService.class)));
-        assertThat(service.getInterfaceClass() == GenericService.class, is(true));
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void testInterface1() throws Exception {
-        ServiceConfig<DemoService> service = new ServiceConfig<DemoService>();
-        service.setInterface(DemoServiceImpl.class);
-    }
-
-    @Test
-    public void testInterface2() throws Exception {
-        ServiceConfig<DemoService> service = new ServiceConfig<DemoService>();
-        service.setInterface(DemoService.class);
-        assertThat(service.getInterface(), equalTo(DemoService.class.getName()));
-    }
-
-    @Test
-    public void testProvider() throws Exception {
-        ServiceConfig service = new ServiceConfig();
-        ProviderConfig provider = new ProviderConfig();
-        service.setProvider(provider);
-        assertThat(service.getProvider(), is(provider));
-    }
-
-    @Test
-    public void testGeneric1() throws Exception {
-        ServiceConfig service = new ServiceConfig();
-        service.setGeneric(GENERIC_SERIALIZATION_DEFAULT);
-        assertThat(service.getGeneric(), equalTo(GENERIC_SERIALIZATION_DEFAULT));
-        service.setGeneric(GENERIC_SERIALIZATION_NATIVE_JAVA);
-        assertThat(service.getGeneric(), equalTo(GENERIC_SERIALIZATION_NATIVE_JAVA));
-        service.setGeneric(GENERIC_SERIALIZATION_BEAN);
-        assertThat(service.getGeneric(), equalTo(GENERIC_SERIALIZATION_BEAN));
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testGeneric2() throws Exception {
-        ServiceConfig service = new ServiceConfig();
-        service.setGeneric("illegal");
-    }
-
-    @Test
-    public void testUniqueServiceName() throws Exception {
-        ServiceConfig<Greeting> service = new ServiceConfig<Greeting>();
-        service.setGroup("dubbo");
-        service.setInterface(Greeting.class);
-        service.setVersion("1.0.0");
-        assertThat(service.getUniqueServiceName(), equalTo("dubbo/" + Greeting.class.getName() + ":1.0.0"));
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/Box.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/Box.java
deleted file mode 100644
index e63f924..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/Box.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.api;
-
-public interface Box {
-
-    String getName();
-
-}
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/DemoException.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/DemoException.java
deleted file mode 100644
index 269dc2b..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/DemoException.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.api;
-
-/**
- * DemoException
- */
-public class DemoException extends Exception {
-
-    private static final long serialVersionUID = -8213943026163641747L;
-
-    public DemoException() {
-        super();
-    }
-
-    public DemoException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    public DemoException(String message) {
-        super(message);
-    }
-
-    public DemoException(Throwable cause) {
-        super(cause);
-    }
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/DemoService.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/DemoService.java
deleted file mode 100644
index 249858f..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/DemoService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.api;
-
-import java.util.List;
-
-
-/**
- * DemoService
- */
-public interface DemoService {
-
-    String sayName(String name);
-
-    Box getBox();
-
-    void throwDemoException() throws DemoException;
-
-    List<User> getUsers(List<User> users);
-
-    int echo(int i);
-
-}
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/Greeting.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/Greeting.java
deleted file mode 100644
index c2afa98..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/Greeting.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.api;
-
-import org.apache.dubbo.common.extension.SPI;
-
-@SPI
-public interface Greeting {
-    String hello();
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/User.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/User.java
deleted file mode 100644
index f4941b3..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/api/User.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.api;
-
-import java.io.Serializable;
-
-/**
- * User
- */
-public class User implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private String name;
-
-    public User() {
-    }
-
-    public User(String name) {
-        this.name = name;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    @Override
-    public int hashCode() {
-        return name == null ? -1 : name.hashCode();
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof User)) {
-            return false;
-        }
-        User other = (User) obj;
-        if (this == other) {
-            return true;
-        }
-        if (name != null && other.name != null) {
-            return name.equals(other.name);
-        }
-        return false;
-    }
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/cache/CacheService.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/cache/CacheService.java
deleted file mode 100644
index c6a2f65..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/cache/CacheService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.cache;
-
-/**
- * ValidationService
- */
-public interface CacheService {
-
-    String findCache(String id);
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/cache/CacheServiceImpl.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/cache/CacheServiceImpl.java
deleted file mode 100644
index a0304c0..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/cache/CacheServiceImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.cache;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * ValidationServiceImpl
- */
-public class CacheServiceImpl implements CacheService {
-
-    private final AtomicInteger i = new AtomicInteger();
-
-    public String findCache(String id) {
-        return "request: " + id + ", response: " + i.getAndIncrement();
-    }
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/cache/CacheTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/cache/CacheTest.java
deleted file mode 100644
index d69eeb8..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/cache/CacheTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.cache;
-
-import org.apache.dubbo.cache.Cache;
-import org.apache.dubbo.cache.CacheFactory;
-import org.apache.dubbo.cache.support.threadlocal.ThreadLocalCache;
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.common.extension.ExtensionLoader;
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.MethodConfig;
-import org.apache.dubbo.config.ProtocolConfig;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.rpc.Invocation;
-import org.apache.dubbo.rpc.RpcInvocation;
-
-import junit.framework.TestCase;
-import org.junit.Test;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * CacheTest
- */
-public class CacheTest extends TestCase {
-
-    private void testCache(String type) throws Exception {
-        ServiceConfig<CacheService> service = new ServiceConfig<CacheService>();
-        service.setApplication(new ApplicationConfig("cache-provider"));
-        service.setRegistry(new RegistryConfig("N/A"));
-        service.setProtocol(new ProtocolConfig("injvm"));
-        service.setInterface(CacheService.class.getName());
-        service.setRef(new CacheServiceImpl());
-        service.export();
-        try {
-            ReferenceConfig<CacheService> reference = new ReferenceConfig<CacheService>();
-            reference.setApplication(new ApplicationConfig("cache-consumer"));
-            reference.setInterface(CacheService.class);
-            reference.setUrl("injvm://127.0.0.1?scope=remote&cache=true");
-
-            MethodConfig method = new MethodConfig();
-            method.setName("findCache");
-            method.setCache(type);
-            reference.setMethods(Arrays.asList(method));
-
-            CacheService cacheService = reference.get();
-            try {
-                // verify cache, same result is returned for multiple invocations (in fact, the return value increases
-                // on every invocation on the server side)
-                String fix = null;
-                for (int i = 0; i < 3; i++) {
-                    String result = cacheService.findCache("0");
-                    assertTrue(fix == null || fix.equals(result));
-                    fix = result;
-                    Thread.sleep(100);
-                }
-
-                if ("lru".equals(type)) {
-                    // default cache.size is 1000 for LRU, should have cache expired if invoke more than 1001 times
-                    for (int n = 0; n < 1001; n++) {
-                        String pre = null;
-                        for (int i = 0; i < 10; i++) {
-                            String result = cacheService.findCache(String.valueOf(n));
-                            assertTrue(pre == null || pre.equals(result));
-                            pre = result;
-                        }
-                    }
-
-                    // verify if the first cache item is expired in LRU cache
-                    String result = cacheService.findCache("0");
-                    assertFalse(fix == null || fix.equals(result));
-                }
-            } finally {
-                reference.destroy();
-            }
-        } finally {
-            service.unexport();
-        }
-    }
-
-    @Test
-    public void testCache() throws Exception {
-        testCache("lru");
-        testCache("threadlocal");
-    }
-
-    @Test
-    public void testCacheProvider() throws Exception {
-        CacheFactory cacheFactory = ExtensionLoader.getExtensionLoader(CacheFactory.class).getAdaptiveExtension();
-
-        Map<String, String> parameters = new HashMap<String, String>();
-        parameters.put("findCache.cache", "threadlocal");
-        URL url = new URL("dubbo", "127.0.0.1", 29582, "org.apache.dubbo.config.cache.CacheService", parameters);
-
-        Invocation invocation = new RpcInvocation("findCache", new Class[]{String.class}, new String[]{"0"}, null, null);
-
-        Cache cache = cacheFactory.getCache(url, invocation);
-        assertTrue(cache instanceof ThreadLocalCache);
-    }
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/consumer/DemoActionByAnnotation.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/consumer/DemoActionByAnnotation.java
deleted file mode 100644
index 8a661dc..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/consumer/DemoActionByAnnotation.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.consumer;
-
-import org.apache.dubbo.config.api.DemoService;
-
-import org.springframework.beans.factory.annotation.Autowired;
-
-/**
- * DemoAction
- */
-public class DemoActionByAnnotation {
-
-    @Autowired
-    private DemoService demoService;
-
-    public DemoService getDemoService() {
-        return demoService;
-    }
-
-}
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/consumer/DemoActionBySetter.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/consumer/DemoActionBySetter.java
deleted file mode 100644
index 897d523..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/consumer/DemoActionBySetter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.consumer;
-
-import org.apache.dubbo.config.api.DemoService;
-
-/**
- * DemoAction
- */
-public class DemoActionBySetter {
-
-    private DemoService demoService;
-
-    public DemoService getDemoService() {
-        return demoService;
-    }
-
-    public void setDemoService(DemoService demoService) {
-        this.demoService = demoService;
-    }
-
-}
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/consumer/DemoInterceptor.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/consumer/DemoInterceptor.java
deleted file mode 100644
index 96e2285..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/consumer/DemoInterceptor.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.consumer;
-
-import org.aopalliance.intercept.MethodInterceptor;
-import org.aopalliance.intercept.MethodInvocation;
-
-/**
- * DemoInterceptor
- */
-public class DemoInterceptor implements MethodInterceptor {
-
-    public Object invoke(MethodInvocation invocation) throws Throwable {
-        return "aop:" + invocation.proceed();
-    }
-
-}
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/invoker/DelegateProviderMetaDataInvokerTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/invoker/DelegateProviderMetaDataInvokerTest.java
deleted file mode 100644
index af21751..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/invoker/DelegateProviderMetaDataInvokerTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config.invoker;
-
-import org.apache.dubbo.config.api.Greeting;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.rpc.Invocation;
-import org.apache.dubbo.rpc.Invoker;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import static org.hamcrest.Matchers.sameInstance;
-import static org.junit.Assert.assertThat;
-
-public class DelegateProviderMetaDataInvokerTest {
-    private ServiceConfig service;
-    private Invoker<Greeting> invoker;
-
-    @Before
-    public void setUp() throws Exception {
-        service = Mockito.mock(ServiceConfig.class);
-        invoker = Mockito.mock(Invoker.class);
-    }
-
-    @Test
-    public void testDelegate() throws Exception {
-        DelegateProviderMetaDataInvoker<Greeting> delegate =
-                new DelegateProviderMetaDataInvoker<Greeting>(invoker, service);
-        delegate.getInterface();
-        Mockito.verify(invoker).getInterface();
-        delegate.getUrl();
-        Mockito.verify(invoker).getUrl();
-        delegate.isAvailable();
-        Mockito.verify(invoker).isAvailable();
-        Invocation invocation = Mockito.mock(Invocation.class);
-        delegate.invoke(invocation);
-        Mockito.verify(invoker).invoke(invocation);
-        delegate.destroy();
-        Mockito.verify(invoker).destroy();
-        assertThat(delegate.getMetadata(), sameInstance(service));
-    }
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingLocal1.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingLocal1.java
deleted file mode 100644
index f3d5ee5..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingLocal1.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-public class GreetingLocal1 {
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingLocal2.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingLocal2.java
deleted file mode 100644
index 8cae406..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingLocal2.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.config.api.Greeting;
-
-public class GreetingLocal2 implements Greeting {
-    @Override
-    public String hello() {
-        return "local";
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingLocal3.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingLocal3.java
deleted file mode 100644
index 9b14ac6..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingLocal3.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.config.api.Greeting;
-
-public class GreetingLocal3 implements Greeting {
-    private Greeting greeting;
-
-    public GreetingLocal3(Greeting greeting) {
-        this.greeting = greeting;
-    }
-
-    @Override
-    public String hello() {
-        return null;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingMock1.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingMock1.java
deleted file mode 100644
index 8bfe6e6..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingMock1.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-public class GreetingMock1 {
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingMock2.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingMock2.java
deleted file mode 100644
index 429bff4..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/GreetingMock2.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.config.api.Greeting;
-
-public class GreetingMock2 implements Greeting {
-    private GreetingMock2() {
-    }
-
-    @Override
-    public String hello() {
-        return "mock";
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockCluster.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockCluster.java
deleted file mode 100644
index 39bf974..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockCluster.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.RpcException;
-import org.apache.dubbo.rpc.cluster.Cluster;
-import org.apache.dubbo.rpc.cluster.Directory;
-
-public class MockCluster implements Cluster {
-    @Override
-    public <T> Invoker<T> join(Directory<T> directory) throws RpcException {
-        return null;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockCodec.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockCodec.java
deleted file mode 100644
index c1aac42..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockCodec.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.remoting.Channel;
-import org.apache.dubbo.remoting.Codec;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class MockCodec implements Codec {
-    @Override
-    public void encode(Channel channel, OutputStream output, Object message) throws IOException {
-
-    }
-
-    @Override
-    public Object decode(Channel channel, InputStream input) throws IOException {
-        return null;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockDispatcher.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockDispatcher.java
deleted file mode 100644
index 32fffca..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockDispatcher.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.remoting.ChannelHandler;
-import org.apache.dubbo.remoting.Dispatcher;
-
-public class MockDispatcher implements Dispatcher {
-    @Override
-    public ChannelHandler dispatch(ChannelHandler handler, URL url) {
-        return null;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockExchanger.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockExchanger.java
deleted file mode 100644
index fccfd23..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockExchanger.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.remoting.RemotingException;
-import org.apache.dubbo.remoting.exchange.ExchangeClient;
-import org.apache.dubbo.remoting.exchange.ExchangeHandler;
-import org.apache.dubbo.remoting.exchange.ExchangeServer;
-import org.apache.dubbo.remoting.exchange.Exchanger;
-
-public class MockExchanger implements Exchanger {
-    @Override
-    public ExchangeServer bind(URL url, ExchangeHandler handler) throws RemotingException {
-        return null;
-    }
-
-    @Override
-    public ExchangeClient connect(URL url, ExchangeHandler handler) throws RemotingException {
-        return null;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockExporterListener.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockExporterListener.java
deleted file mode 100644
index c374395..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockExporterListener.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.rpc.Exporter;
-import org.apache.dubbo.rpc.ExporterListener;
-import org.apache.dubbo.rpc.RpcException;
-
-public class MockExporterListener implements ExporterListener  {
-    @Override
-    public void exported(Exporter<?> exporter) throws RpcException {
-
-    }
-
-    @Override
-    public void unexported(Exporter<?> exporter) {
-
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockFilter.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockFilter.java
deleted file mode 100644
index d51f123..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockFilter.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.rpc.Filter;
-import org.apache.dubbo.rpc.Invocation;
-import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.Result;
-import org.apache.dubbo.rpc.RpcException;
-
-public class MockFilter implements Filter {
-    @Override
-    public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
-        return null;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockInvokerListener.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockInvokerListener.java
deleted file mode 100644
index c929e54..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockInvokerListener.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.InvokerListener;
-import org.apache.dubbo.rpc.RpcException;
-
-public class MockInvokerListener implements InvokerListener {
-    @Override
-    public void referred(Invoker<?> invoker) throws RpcException {
-
-    }
-
-    @Override
-    public void destroyed(Invoker<?> invoker) {
-
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockLoadBalance.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockLoadBalance.java
deleted file mode 100644
index 377f328..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockLoadBalance.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.rpc.Invocation;
-import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.RpcException;
-import org.apache.dubbo.rpc.cluster.LoadBalance;
-
-import java.util.List;
-
-public class MockLoadBalance implements LoadBalance {
-    @Override
-    public <T> Invoker<T> select(List<Invoker<T>> invokers, URL url, Invocation invocation) throws RpcException {
-        return null;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockProtocol.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockProtocol.java
deleted file mode 100644
index f4cb8ce..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockProtocol.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.rpc.Exporter;
-import org.apache.dubbo.rpc.Invocation;
-import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.Protocol;
-import org.apache.dubbo.rpc.Result;
-import org.apache.dubbo.rpc.RpcException;
-
-public class MockProtocol implements Protocol {
-
-    /* (non-Javadoc)
-     * @see org.apache.dubbo.rpc.Protocol#getDefaultPort()
-     */
-    @Override
-    public int getDefaultPort() {
-
-        return 0;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.dubbo.rpc.Protocol#export(org.apache.dubbo.rpc.Invoker)
-     */
-    public <T> Exporter<T> export(Invoker<T> invoker) throws RpcException {
-        return null;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.dubbo.rpc.Protocol#refer(java.lang.Class, org.apache.dubbo.common.URL)
-     */
-    public <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException {
-
-        final URL u = url;
-
-        return new Invoker<T>() {
-            @Override
-            public Class<T> getInterface() {
-                return null;
-            }
-
-            public URL getUrl() {
-                return u;
-            }
-
-            @Override
-            public boolean isAvailable() {
-                return true;
-            }
-
-            public Result invoke(Invocation invocation) throws RpcException {
-                return null;
-            }
-
-            @Override
-            public void destroy() {
-
-            }
-        };
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.dubbo.rpc.Protocol#destroy()
-     */
-    @Override
-    public void destroy() {
-
-    }
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockProtocol2.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockProtocol2.java
deleted file mode 100644
index 91653d4..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockProtocol2.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.rpc.Exporter;
-import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.Protocol;
-import org.apache.dubbo.rpc.RpcException;
-
-public class MockProtocol2 implements Protocol {
-    public static Protocol delegate;
-
-    @Override
-    public int getDefaultPort() {
-        return delegate.getDefaultPort();
-    }
-
-    @Override
-    public <T> Exporter<T> export(Invoker<T> invoker) throws RpcException {
-        return delegate.export(invoker);
-    }
-
-    @Override
-    public <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException {
-        return delegate.refer(type, url);
-    }
-
-    @Override
-    public void destroy() {
-        delegate.destroy();
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockProxyFactory.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockProxyFactory.java
deleted file mode 100644
index 49f05d8..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockProxyFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.ProxyFactory;
-import org.apache.dubbo.rpc.RpcException;
-
-public class MockProxyFactory implements ProxyFactory {
-    @Override
-    public <T> T getProxy(Invoker<T> invoker) throws RpcException {
-        return null;
-    }
-
-    @Override
-    public <T> T getProxy(Invoker<T> invoker, boolean generic) throws RpcException {
-        return null;
-    }
-
-    @Override
-    public <T> Invoker<T> getInvoker(T proxy, Class<T> type, URL url) throws RpcException {
-        return null;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockRegistry.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockRegistry.java
deleted file mode 100644
index 255262d..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockRegistry.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.Constants;
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.registry.NotifyListener;
-import org.apache.dubbo.registry.Registry;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * TODO Comment of MockRegistry
- */
-public class MockRegistry implements Registry {
-
-    static URL subscribedUrl = new URL("null", "0.0.0.0", 0);
-
-    public static URL getSubscribedUrl() {
-        return subscribedUrl;
-    }
-
-    /* 
-     * @see org.apache.dubbo.common.Node#getUrl()
-     */
-    public URL getUrl() {
-        return null;
-    }
-
-    /* 
-     * @see org.apache.dubbo.common.Node#isAvailable()
-     */
-    @Override
-    public boolean isAvailable() {
-        return true;
-    }
-
-    /* 
-     * @see org.apache.dubbo.common.Node#destroy()
-     */
-    @Override
-    public void destroy() {
-
-    }
-
-    /* 
-     * @see org.apache.dubbo.registry.RegistryService#register(org.apache.dubbo.common.URL)
-     */
-    @Override
-    public void register(URL url) {
-
-    }
-
-    /* 
-     * @see org.apache.dubbo.registry.RegistryService#unregister(org.apache.dubbo.common.URL)
-     */
-    @Override
-    public void unregister(URL url) {
-
-    }
-
-    /* 
-     * @see org.apache.dubbo.registry.RegistryService#subscribe(org.apache.dubbo.common.URL, org.apache.dubbo.registry.NotifyListener)
-     */
-    @Override
-    public void subscribe(URL url, NotifyListener listener) {
-        this.subscribedUrl = url;
-        List<URL> urls = new ArrayList<URL>();
-
-        urls.add(url.setProtocol("mockprotocol")
-                .removeParameter(Constants.CATEGORY_KEY)
-                .addParameter(Constants.METHODS_KEY, "sayHello"));
-
-        listener.notify(urls);
-    }
-
-    /* 
-     * @see org.apache.dubbo.registry.RegistryService#unsubscribe(org.apache.dubbo.common.URL, org.apache.dubbo.registry.NotifyListener)
-     */
-    @Override
-    public void unsubscribe(URL url, NotifyListener listener) {
-
-    }
-
-    /* 
-     * @see org.apache.dubbo.registry.RegistryService#lookup(org.apache.dubbo.common.URL)
-     */
-    @Override
-    public List<URL> lookup(URL url) {
-        return null;
-    }
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockRegistryFactory.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockRegistryFactory.java
deleted file mode 100644
index 92e23b1..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockRegistryFactory.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.registry.Registry;
-import org.apache.dubbo.registry.RegistryFactory;
-
-/**
- * TODO Comment of MockRegistryFactory
- */
-public class MockRegistryFactory implements RegistryFactory {
-
-    /* 
-     * @see org.apache.dubbo.registry.RegistryFactory#getRegistry(org.apache.dubbo.common.URL)
-     */
-    @Override
-    public Registry getRegistry(URL url) {
-
-        return new MockRegistry();
-    }
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockRegistryFactory2.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockRegistryFactory2.java
deleted file mode 100644
index 2ab3da8..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockRegistryFactory2.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.registry.Registry;
-import org.apache.dubbo.registry.RegistryFactory;
-
-public class MockRegistryFactory2 implements RegistryFactory {
-    public static Registry registry;
-
-    @Override
-    public Registry getRegistry(URL url) {
-        return registry;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockStatusChecker.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockStatusChecker.java
deleted file mode 100644
index e144c7b..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockStatusChecker.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.status.Status;
-import org.apache.dubbo.common.status.StatusChecker;
-
-public class MockStatusChecker implements StatusChecker {
-    @Override
-    public Status check() {
-        return null;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockTelnetHandler.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockTelnetHandler.java
deleted file mode 100644
index a08160f..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockTelnetHandler.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.remoting.Channel;
-import org.apache.dubbo.remoting.RemotingException;
-import org.apache.dubbo.remoting.telnet.TelnetHandler;
-
-public class MockTelnetHandler implements TelnetHandler {
-    @Override
-    public String telnet(Channel channel, String message) throws RemotingException {
-        return null;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockThreadPool.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockThreadPool.java
deleted file mode 100644
index a399884..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockThreadPool.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.common.threadpool.ThreadPool;
-
-import java.util.concurrent.Executor;
-
-public class MockThreadPool implements ThreadPool  {
-    @Override
-    public Executor getExecutor(URL url) {
-        return null;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockTransporter.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockTransporter.java
deleted file mode 100644
index 08d005d..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/MockTransporter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.remoting.ChannelHandler;
-import org.apache.dubbo.remoting.Client;
-import org.apache.dubbo.remoting.RemotingException;
-import org.apache.dubbo.remoting.Server;
-import org.apache.dubbo.remoting.Transporter;
-import org.mockito.Mockito;
-
-public class MockTransporter implements Transporter {
-    private Server server = Mockito.mock(Server.class);
-    private Client client = Mockito.mock(Client.class);
-
-    @Override
-    public Server bind(URL url, ChannelHandler handler) throws RemotingException {
-        return server;
-    }
-
-    @Override
-    public Client connect(URL url, ChannelHandler handler) throws RemotingException {
-        return client;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/TestProxyFactory.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/TestProxyFactory.java
deleted file mode 100644
index fe22bd1..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/mock/TestProxyFactory.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.config.mock;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.RpcException;
-import org.apache.dubbo.rpc.proxy.jdk.JdkProxyFactory;
-
-public class TestProxyFactory extends JdkProxyFactory {
-    public static int count = 0;
-
-    @Override
-    public <T> Invoker<T> getInvoker(T proxy, Class<T> type, URL url) throws RpcException {
-        count++;
-        return super.getInvoker(proxy, type, url);
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/provider/impl/DemoServiceImpl.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/provider/impl/DemoServiceImpl.java
deleted file mode 100644
index 6df10d8..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/provider/impl/DemoServiceImpl.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.provider.impl;
-
-import org.apache.dubbo.config.api.Box;
-import org.apache.dubbo.config.api.DemoException;
-import org.apache.dubbo.config.api.DemoService;
-import org.apache.dubbo.config.api.User;
-
-import java.util.List;
-
-/**
- * DemoServiceImpl
- */
-public class DemoServiceImpl implements DemoService {
-
-    public String sayName(String name) {
-        return "say:" + name;
-    }
-
-    public Box getBox() {
-        return null;
-    }
-
-    public void throwDemoException() throws DemoException {
-        throw new DemoException("DemoServiceImpl");
-    }
-
-    public List<User> getUsers(List<User> users) {
-        return users;
-    }
-
-    public int echo(int i) {
-        return i;
-    }
-
-}
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/ExporterSideConfigUrlTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/ExporterSideConfigUrlTest.java
deleted file mode 100644
index c66a40d..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/ExporterSideConfigUrlTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.url;
-
-
-import org.apache.dubbo.common.logger.Logger;
-import org.apache.dubbo.common.logger.LoggerFactory;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-
-public class ExporterSideConfigUrlTest extends UrlTestBase {
-
-    private static final Logger log = LoggerFactory.getLogger(ExporterSideConfigUrlTest.class);
-
-    // ======================================================
-    //   tests start
-    // ======================================================  
-    @BeforeClass
-    public static void start() {
-    }
-
-
-    @Before
-    public void setUp() {
-        initServConf();
-    }
-
-    @After()
-    public void teardown() {
-    }
-
-    @Test
-    public void exporterMethodConfigUrlTest() {
-        verifyExporterUrlGeneration(methodConfForService, methodConfForServiceTable);
-    }
-
-    @Test
-    public void exporterServiceConfigUrlTest() {
-        verifyExporterUrlGeneration(servConf, servConfTable);
-    }
-
-    @Test
-    public void exporterProviderConfigUrlTest() {
-
-        verifyExporterUrlGeneration(provConf, provConfTable);
-    }
-
-    @Test
-    public void exporterRegistryConfigUrlTest() {
-
-        //verifyExporterUrlGeneration(regConfForService, regConfForServiceTable);
-    }
-
-
-    protected <T> void verifyExporterUrlGeneration(T config, Object[][] dataTable) {
-
-        // 1. fill corresponding config with data
-        ////////////////////////////////////////////////////////////
-        fillConfigs(config, dataTable, TESTVALUE1);
-
-        // 2. export service and get url parameter string from db
-        ////////////////////////////////////////////////////////////
-        servConf.export();
-        String paramStringFromDb = getProviderParamString();
-        try {
-            paramStringFromDb = URLDecoder.decode(paramStringFromDb, "UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            // impossible
-        }
-
-
-        assertUrlStringWithLocalTable(paramStringFromDb, dataTable, config.getClass().getName(), TESTVALUE1);
-
-
-        // 4. unexport service
-        ////////////////////////////////////////////////////////////
-        servConf.unexport();
-    }
-}
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/InvokerSideConfigUrlTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/InvokerSideConfigUrlTest.java
deleted file mode 100644
index e01933a..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/InvokerSideConfigUrlTest.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.url;
-
-import org.apache.dubbo.common.Constants;
-import org.apache.dubbo.common.logger.Logger;
-import org.apache.dubbo.common.logger.LoggerFactory;
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ConsumerConfig;
-import org.apache.dubbo.config.MethodConfig;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.api.DemoService;
-import org.apache.dubbo.config.mock.MockRegistry;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import java.util.Arrays;
-
-
-public class InvokerSideConfigUrlTest extends UrlTestBase {
-    private static final Logger log = LoggerFactory.getLogger(InvokerSideConfigUrlTest.class);
-
-    // ======================================================
-    //   invoker related data preparing
-    // ======================================================  
-    private ApplicationConfig appConfForConsumer;
-    private ApplicationConfig appConfForReference;
-    private RegistryConfig regConfForConsumer;
-    private RegistryConfig regConfForReference;
-    private MethodConfig methodConfForReference;
-    private ConsumerConfig consumerConf;
-    private ReferenceConfig<DemoService> refConf;
-
-    private Object appConfForConsumerTable[][] = {
-            {"", "", "", "", "", "", "", "", "", ""},
-    };
-
-    private Object appConfForReferenceTable[][] = {
-            {"", "", "", "", "", "", "", "", "", ""},
-    };
-
-    private Object regConfForConsumerTable[][] = {
-//            {"timeout", "registry.timeout", "int", 5000, 9000, "", "", "", "", ""}, 
-//            {"file", "registry.file", "string", "", "regConfForServiceTable.log", "", "", "", "", ""}, 
-//            {"wait", "registry.wait", "int", 0, 9000, "", "", "", "", ""}, 
-//            {"transport", "registry.transporter", "string", "netty", "mina", "", "", "", "", ""}, 
-            {"subscribe", "subscribe", "boolean", true, false, "", "", "", "", ""},
-            {"dynamic", "dynamic", "boolean", true, false, "", "", "", "", ""},
-    };
-
-    private Object regConfForReferenceTable[][] = {
-            {"timeout", "registry.timeout", "int", 5000, 9000, "", "", "", "", ""},
-            {"file", "registry.file", "string", "", "regConfForServiceTable.log", "", "", "", "", ""},
-            {"wait", "registry.wait", "int", 0, 9000, "", "", "", "", ""},
-            {"transport", "registry.transporter", "string", "netty", "mina", "", "", "", "", ""},
-            {"subscribe", "subscribe", "boolean", true, false, "", "", "", "", ""},
-            {"dynamic", "dynamic", "boolean", true, false, "", "", "", "", ""},
-    };
-
-    private Object methodConfForReferenceTable[][] = {
-            {"actives", "eatTiger.actives", "int", 0, 90, "", "", "", "", ""},
-            {"executes", "eatTiger.executes", "int", 0, 90, "", "", "", "", ""},
-            {"deprecated", "eatTiger.deprecated", "boolean", false, true, "", "", "", "", ""},
-            {"async", "eatTiger.async", "boolean", false, true, "", "", "", "", ""},
-            {"timeout", "eatTiger.timeout", "int", 0, 90, "", "", "", "", ""},
-    };
-
-    private Object refConfTable[][] = {
-//            {"version", "version", "string", "0.0.0", "1.2.3", "", "", "", "", ""}, 
-//            {"group", "group", "string", "", "HaominTest", "", "", "", "", ""}, 
-
-//            {"delay", "delay", "int", 0, 5, "", "", "", "", ""}, // not boolean 
-            {"timeout", "timeout", "int", 5000, 3000, "", "", "", "", ""},
-            {"retries", "retries", "int", 2, 5, "", "", "", "", ""},
-            {"connections", "connections", "boolean", 100, 20, "", "", "", "", ""},
-            {"loadbalance", "loadbalance", "string", "random", "roundrobin", "leastactive", "", "", ""},
-            {"async", "async", "boolean", false, true, "", "", "", "", ""},
-            //excluded = true
-//            {"generic", "generic", "boolean", false, true, "", "", "", "", ""},  
-            {"check", "check", "boolean", false, true, "", "", "", "", ""},
-            //{"local", "local", "string", "false", "HelloServiceLocal", "true", "", "", "", ""}, 
-            //{"local", "local", "string", "false", "true", "", "", "", "", ""}, 
-            //{"mock", "mock", "string", "false", "dubbo.test.HelloServiceMock", "true", "", "", "", ""}, 
-            {"mock", "mock", "string", "false", "false", "", "", "", "", ""},
-            {"proxy", "proxy", "boolean", "javassist", "jdk", "", "", "", "", ""},
-            {"client", "client", "string", "netty", "mina", "", "", "", "", ""},
-            {"client", "client", "string", "netty", "mina", "", "", "", "", ""},
-            {"owner", "owner", "string", "", "haomin,ludvik", "", "", "", "", ""},
-            {"actives", "actives", "int", 0, 30, "", "", "", "", ""},
-            {"cluster", "cluster", "string", "failover", "failfast", "failsafe", "failback", "forking", "", ""},
-            //excluded = true
-//            {"filter", "service.filter", "string", "default", "-generic", "", "", "", "", ""}, 
-            //excluded = true
-//            {"listener", "exporter.listener", "string", "default", "-deprecated", "", "", "", "", ""}, 
-            //{"", "", "", "", "", "", "", "", "", ""}, 
-    };
-
-    private Object consumerConfTable[][] = {
-            {"timeout", "default.timeout", "int", 5000, 8000, "", "", "", "", ""},
-            {"retries", "default.retries", "int", 2, 5, "", "", "", "", ""},
-            {"loadbalance", "default.loadbalance", "string", "random", "leastactive", "", "", "", "", ""},
-            {"async", "default.async", "boolean", false, true, "", "", "", "", ""},
-            {"connections", "default.connections", "int", 100, 5, "", "", "", "", ""},
-//            {"generic", "generic", "boolean", false, false, "", "", "", "", ""}, 
-            {"check", "check", "boolean", true, false, "", "", "", "", ""},
-            {"proxy", "proxy", "string", "javassist", "jdk", "javassist", "", "", "", ""},
-            {"owner", "owner", "string", "", "haomin", "", "", "", "", ""},
-            {"actives", "default.actives", "int", 0, 5, "", "", "", "", ""},
-            {"cluster", "default.cluster", "string", "failover", "forking", "", "", "", "", ""},
-            {"filter", "", "string", "", "", "", "", "", "", ""},
-            {"listener", "", "string", "", "", "", "", "", "", ""},
-//            {"", "", "", "", "", "", "", "", "", ""}, 
-    };
-
-    // ======================================================
-    //   test Start
-    // ====================================================== 
-
-    @BeforeClass
-    public static void start() {
-        //RegistryController.startRegistryIfAbsence(1);
-    }
-
-
-    @Before
-    public void setUp() {
-        initServConf();
-        initRefConf();
-    }
-
-    @After()
-    public void teardown() {
-        //RegistryServer.reloadCache();
-    }
-
-
-    @Test
-    public void consumerConfUrlTest() {
-        verifyInvokerUrlGeneration(consumerConf, consumerConfTable);
-    }
-
-    @Test
-    public void refConfUrlTest() {
-        verifyInvokerUrlGeneration(refConf, refConfTable);
-    }
-
-    @Ignore("parameter on register center will not be merged any longer with query parameter request from the consumer")
-    @Test
-    public void regConfForConsumerUrlTest() {
-        verifyInvokerUrlGeneration(regConfForConsumer, regConfForConsumerTable);
-    }
-
-    // ======================================================
-    //   private helper
-    // ====================================================== 
-    private void initRefConf() {
-
-        appConfForConsumer = new ApplicationConfig();
-        appConfForReference = new ApplicationConfig();
-        regConfForConsumer = new RegistryConfig();
-        regConfForReference = new RegistryConfig();
-        methodConfForReference = new MethodConfig();
-
-        refConf = new ReferenceConfig<DemoService>();
-        consumerConf = new ConsumerConfig();
-
-        methodConfForReference.setName("sayName");
-        regConfForReference.setAddress("127.0.0.1:9090");
-        regConfForReference.setProtocol("mockregistry");
-        appConfForReference.setName("ConfigTests");
-        refConf.setInterface("org.apache.dubbo.config.api.DemoService");
-
-        refConf.setApplication(appConfForReference);
-        consumerConf.setApplication(appConfForConsumer);
-
-        refConf.setRegistry(regConfForReference);
-        consumerConf.setRegistry(regConfForConsumer);
-
-        refConf.setConsumer(consumerConf);
-
-        refConf.setMethods(Arrays.asList(new MethodConfig[]{methodConfForReference}));
-
-        refConf.setScope(Constants.SCOPE_REMOTE);
-    }
-
-    private <T> void verifyInvokerUrlGeneration(T config, Object[][] dataTable) {
-        servConf.export();
-
-        fillConfigs(config, dataTable, TESTVALUE1);
-        refConf.get();
-
-        String subScribedUrlStr = getSubscribedUrlString();
-
-        System.out.println("url string=========:" + subScribedUrlStr);
-        String configName = config.getClass().getName();
-        int column = TESTVALUE1;
-
-        assertUrlStringWithLocalTable(subScribedUrlStr, dataTable, configName, column);
-
-        try {
-            refConf.destroy();
-        } catch (Exception e) {
-        }
-    }
-
-    private String getSubscribedUrlString() {
-        return MockRegistry.getSubscribedUrl().toString();
-    }
-}
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/RpcConfigGetSetProxy.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/RpcConfigGetSetProxy.java
deleted file mode 100644
index d883ec2..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/RpcConfigGetSetProxy.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.url;
-
-import org.apache.dubbo.common.logger.Logger;
-import org.apache.dubbo.common.logger.LoggerFactory;
-import org.apache.dubbo.config.AbstractConfig;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-
-public class RpcConfigGetSetProxy {
-
-    private static final String RPC_CONFIG_BASECLASS = AbstractConfig.class.getName();
-    private static final Logger log = LoggerFactory.getLogger(RpcConfigGetSetProxy.class);
-
-
-    private Object proxiee = null;
-    private Class<?> proxieeClass = null;
-    private Boolean isOk = false;
-
-    public RpcConfigGetSetProxy(Object p) {
-
-        if (p == null) {
-            return;
-        }
-
-        if (!isKindOf(p.getClass(), RPC_CONFIG_BASECLASS)) {
-            return;
-        }
-
-        proxiee = p;
-        //proxieeClass = c;
-        proxieeClass = p.getClass();
-        isOk = true;
-
-    }
-
-    public static boolean isKindOf(Class<?> c, String type) {
-
-        // get the class def for obj and type
-
-        Class<?> tClass;
-        try {
-            tClass = Class.forName(type);
-        } catch (ClassNotFoundException e) {
-            return false;
-        }
-
-        // check against type and superclasses
-        while (c != null) {
-            if (c == tClass) return true;
-            c = c.getSuperclass();
-        }
-
-        return false;
-    }
-
-    public boolean isOk() {
-        return isOk;
-    }
-
-    public Object setValue(String key, Object value) {
-
-        if (!isOk()) {
-            return null;
-        }
-
-        Method m = findSetMethod(key, value, proxieeClass);
-        return invoke(m, value);
-    }
-
-    public Object getValue(String key) {
-
-        if (!isOk()) {
-            return null;
-        }
-
-        Method m = findGetMethod(key, proxieeClass);
-        return invoke(m, null);
-    }
-
-    private Object invoke(Method m, Object value) {
-
-        if (m == null) {
-            return null;
-        }
-
-        try {
-            if (value == null) {
-                return m.invoke(proxiee, (Object[]) null);
-            } else {
-                return m.invoke(proxiee, value);
-            }
-        } catch (IllegalArgumentException e) {
-            log.error("IllegalArgumentException", e);
-            return null;
-        } catch (IllegalAccessException e) {
-            log.error("IllegalAccessException", e);
-            return null;
-        } catch (InvocationTargetException e) {
-            log.error("InvocationTargetException", e);
-            return null;
-        }
-    }
-
-    private Method findGetMethod(String key, Class<?> clazz) {
-
-        Method m = findMethod(key, null, "get", clazz);
-        if (m != null) {
-            return m;
-        }
-
-        return findMethod(key, null, "is", clazz);
-    }
-
-    private Method findSetMethod(String key, Object value, Class<?> clazz) {
-
-        return findMethod(key, value, "set", clazz);
-    }
-
-    private Method getMethod(String methodName, Object value, Class<?> clazz) {
-
-        try {
-            if (value == null) {
-                return clazz.getMethod(methodName, (Class<?>[]) null);
-            } else {
-                return clazz.getMethod(methodName, value.getClass());
-            }
-        } catch (SecurityException e) {
-            log.error("SecurityException: " + e.getMessage());
-            return null;
-        } catch (NoSuchMethodException e) {
-            log.error("NoSuchMethodException: " + e.getMessage());
-            return null;
-        }
-    }
-
-    private Method findMethod(String key, Object value, String prefix, Class<?> clazz) {
-
-        if (key.length() < 2) {
-            return null;
-        }
-
-        key = key.substring(0, 1).toUpperCase() + key.substring(1);
-        String methodName = prefix + key;
-
-        return getMethod(methodName, value, clazz);
-    }
-
-}
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/UrlTestBase.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/UrlTestBase.java
deleted file mode 100644
index b342685..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/url/UrlTestBase.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.url;
-
-
-import org.apache.dubbo.common.logger.Logger;
-import org.apache.dubbo.common.logger.LoggerFactory;
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.MethodConfig;
-import org.apache.dubbo.config.ProtocolConfig;
-import org.apache.dubbo.config.ProviderConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.config.api.DemoService;
-import org.apache.dubbo.config.provider.impl.DemoServiceImpl;
-
-import java.util.Arrays;
-
-import static junit.framework.TestCase.fail;
-
-@SuppressWarnings("unused")
-public class UrlTestBase {
-
-    // ======================================================
-    //   data column definition
-    // ======================================================
-    protected static final int KEY = 0;
-    protected static final int URL_KEY = 1;
-    protected static final int TESTVALUE1 = 4;
-    private static final Logger log = LoggerFactory.getLogger(UrlTestBase.class);
-    private static final int TYPE = 2;
-    private static final int DEFAULT = 3;
-    private static final int TESTVALUE2 = 5;
-    private static final int TESTVALUE3 = 6;
-    private static final int TESTVALUE4 = 7;
-    private static final int TESTVALUE5 = 8;
-    private static final int TESTVALUE6 = 9;
-    private static final int TESTVALUE7 = 10;
-    protected ApplicationConfig appConfForProvider;
-    protected ApplicationConfig appConfForService;
-    protected RegistryConfig regConfForProvider;
-    protected RegistryConfig regConfForService;
-    protected ProviderConfig provConf;
-    protected ProtocolConfig protoConfForProvider;
-    protected ProtocolConfig protoConfForService;
-    protected MethodConfig methodConfForService;
-    protected ServiceConfig<DemoService> servConf;
-    protected Object servConfTable[][] = {
-            {"proxy", "proxy", "string", "javassist", "jdk", "javassist", "", "", "", ""},
-            {"actives", "actives", "int", 0, 90, "", "", "", "", ""},
-            {"executes", "executes", "int", 0, 90, "", "", "", "", ""},
-            {"deprecated", "deprecated", "boolean", false, true, "", "", "", "", ""},
-            {"dynamic", "dynamic", "boolean", true, false, "", "", "", "", ""},
-            {"accesslog", "accesslog", "string", "", "haominTest", "", "", "", "", ""},
-            {"document", "document", "string", "", "http://b2b-doc.alibaba-inc.com/display/RC/dubbo_devguide.htm?testquery=你好你好", "", "", "", "", ""},
-            {"weight", "weight", "int", 0, 90, "", "", "", "", ""},
-
-            //{"filter", "service.filter", "string", "", "", "", "", "", "", ""},
-            //{"listener", "listener", "string", "", "", "", "", "", "", ""},
-
-    };
-    protected Object regConfForServiceTable[][] = {
-            //            {"timeout", "registry.timeout", "int", 5000, 9000, "", "", "", "", ""},
-            //            {"file", "registry.file", "string", "", "regConfForServiceTable.log", "", "", "", "", ""},
-            //            {"wait", "registry.wait", "int", 0, 9000, "", "", "", "", ""},
-            //            {"transport", "registry.transporter", "string", "netty", "mina", "", "", "", "", ""},
-            //            {"subscribe", "subscribe", "boolean", true, false, "", "", "", "", ""},
-            {"dynamic", "dynamic", "boolean", true, false, "", "", "", "", ""},
-    };
-    protected Object provConfTable[][] = {
-            {"cluster", "default.cluster", "string", "string", "failover", "failfast", "failsafe", "", "", ""},
-            {"async", "default.async", "boolean", false, true, "", "", "", "", ""},
-            {"loadbalance", "default.loadbalance", "string", "random", "leastactive", "", "", "", "", ""},
-            {"connections", "default.connections", "int", 0, 60, "", "", "", "", ""},
-            {"retries", "default.retries", "int", 2, 60, "", "", "", "", ""},
-            {"timeout", "default.timeout", "int", 5000, 60, "", "", "", "", ""},
-            //change by fengting listener 没有缺省值
-            //{"listener", "exporter.listener", "string", "", "", "", "", "", "", ""},
-            //{"filter", "service.filter", "string", "", "", "", "", "", "", ""},
-
-    };
-    protected Object methodConfForServiceTable[][] = {
-            {"actives", "sayName.actives", "int", 0, 90, "", "", "", "", ""},
-            {"executes", "sayName.executes", "int", 0, 90, "", "", "", "", ""},
-            {"deprecated", "sayName.deprecated", "boolean", false, true, "", "", "", "", ""},
-            {"async", "sayName.async", "boolean", false, true, "", "", "", "", ""},
-            {"timeout", "sayName.timeout", "int", 0, 90, "", "", "", "", ""},
-    };
-    protected DemoService demoService = new DemoServiceImpl();
-    private Object appConfForProviderTable[][] = {
-            {"", "", "", "", "", "", "", "", "", ""},
-    };
-    private Object appConfForServiceTable[][] = {
-            {"", "", "", "", "", "", "", "", "", ""},
-    };
-    private Object regConfForProviderTable[][] = {
-            {"", "", "", "", "", "", "", "", "", ""},
-    };
-    private Object protoConfForProviderTable[][] = {
-            {"", "", "", "", "", "", "", "", "", ""},
-    };
-    private Object protoConfForServiceTable[][] = {
-            {"", "", "", "", "", "", "", "", "", ""},
-    };
-
-    // ======================================================
-    //   data table manipulation utils
-    // ====================================================== 
-    protected String genParamString(Object urlKey, Object value) {
-
-        return (String) urlKey + "=" + value.toString();
-    }
-
-    protected <T> void fillConfigs(T conf, Object[][] table, int column) {
-
-        for (Object[] row : table) {
-            fillConfig(conf, row, column);
-        }
-    }
-
-    protected <T> void fillConfig(T conf, Object[] row, int column) {
-
-        RpcConfigGetSetProxy proxy = new RpcConfigGetSetProxy(conf);
-        proxy.setValue((String) row[KEY], row[column]);
-
-    }
-
-    @SuppressWarnings("deprecation")
-    protected void initServConf() {
-
-        appConfForProvider = new ApplicationConfig();
-        appConfForService = new ApplicationConfig();
-        regConfForProvider = new RegistryConfig();
-        regConfForService = new RegistryConfig();
-        provConf = new ProviderConfig();
-        protoConfForProvider = new ProtocolConfig();
-        protoConfForService = new ProtocolConfig();
-        methodConfForService = new MethodConfig();
-        servConf = new ServiceConfig<DemoService>();
-
-        provConf.setApplication(appConfForProvider);
-        servConf.setApplication(appConfForService);
-
-        provConf.setRegistry(regConfForProvider);
-        servConf.setRegistry(regConfForService);
-
-        provConf.setProtocols(Arrays.asList(new ProtocolConfig[]{protoConfForProvider}));
-        servConf.setProtocols(Arrays.asList(new ProtocolConfig[]{protoConfForService}));
-
-        servConf.setMethods(Arrays.asList(new MethodConfig[]{methodConfForService}));
-        servConf.setProvider(provConf);
-
-        servConf.setRef(demoService);
-        servConf.setInterfaceClass(DemoService.class);
-
-        methodConfForService.setName("sayName");
-        regConfForService.setAddress("127.0.0.1:9090");
-        regConfForService.setProtocol("mockregistry");
-        appConfForService.setName("ConfigTests");
-    }
-
-    protected String getProviderParamString() {
-        return servConf.getExportedUrls().get(0).toString();
-    }
-
-    /**
-     * @param paramStringFromDb
-     * @param dataTable
-     * @param configName
-     * @param column
-     */
-    protected void assertUrlStringWithLocalTable(String paramStringFromDb,
-                                                 Object[][] dataTable, String configName, int column) {
-        final String FAILLOG_HEADER = "The following config items are not found in URLONE: ";
-
-        log.warn("Verifying service url for " + configName + "... ");
-        log.warn("Consumer url string: " + paramStringFromDb);
-
-        String failLog = FAILLOG_HEADER;
-        for (Object[] row : dataTable) {
-
-            String targetString = genParamString(row[URL_KEY], row[column]);
-
-            log.warn("Checking " + (String) row[KEY] + "for" + targetString);
-            if (paramStringFromDb.contains(targetString)) {
-                log.warn((String) row[KEY] + " --> " + targetString + " OK!");
-            } else {
-                failLog += targetString + ", ";
-            }
-        }
-
-        if (!failLog.equals(FAILLOG_HEADER)) {
-            fail(failLog);
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/utils/MockReferenceConfig.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/utils/MockReferenceConfig.java
deleted file mode 100644
index 68df6cd..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/utils/MockReferenceConfig.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.utils;
-
-import org.apache.dubbo.config.ReferenceConfig;
-
-import java.util.concurrent.atomic.AtomicLong;
-
-public class MockReferenceConfig extends ReferenceConfig<String> {
-    static AtomicLong counter = new AtomicLong();
-
-    String value;
-    boolean destroyMethodRun = false;
-
-    public static void setCounter(long c) {
-        counter.set(c);
-    }
-
-    public boolean isGetMethodRun() {
-        return value != null;
-    }
-
-    public boolean isDestroyMethodRun() {
-        return destroyMethodRun;
-    }
-
-    @Override
-    public synchronized String get() {
-        if (value != null) return value;
-
-        value = "" + counter.getAndIncrement();
-        return value;
-    }
-
-    @Override
-    public synchronized void destroy() {
-        destroyMethodRun = true;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/utils/ReferenceConfigCacheTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/utils/ReferenceConfigCacheTest.java
deleted file mode 100644
index 8216609..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/utils/ReferenceConfigCacheTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.utils;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-public class ReferenceConfigCacheTest {
-    @Before
-    public void setUp() throws Exception {
-        MockReferenceConfig.setCounter(0);
-        ReferenceConfigCache.cacheHolder.clear();
-    }
-
-    @Test
-    public void testGetCacheSameReference() throws Exception {
-        ReferenceConfigCache cache = ReferenceConfigCache.getCache();
-        MockReferenceConfig config = buildMockReferenceConfig("FooService", "group1", "1.0.0");
-        String value = cache.get(config);
-        assertTrue(config.isGetMethodRun());
-        assertEquals("0", value);
-
-        MockReferenceConfig configCopy = buildMockReferenceConfig("FooService", "group1", "1.0.0");
-        value = cache.get(configCopy);
-        assertFalse(configCopy.isGetMethodRun());
-        assertEquals("0", value);
-    }
-
-    @Test
-    public void testGetCacheDiffReference() throws Exception {
-        ReferenceConfigCache cache = ReferenceConfigCache.getCache();
-        MockReferenceConfig config = buildMockReferenceConfig("FooService", "group1", "1.0.0");
-        String value = cache.get(config);
-        assertTrue(config.isGetMethodRun());
-        assertEquals("0", value);
-
-        MockReferenceConfig configCopy = buildMockReferenceConfig("XxxService", "group1", "1.0.0");
-        value = cache.get(configCopy);
-        assertTrue(configCopy.isGetMethodRun());
-        assertEquals("1", value);
-    }
-
-    @Test
-    public void testGetCacheDiffName() throws Exception {
-        ReferenceConfigCache cache = ReferenceConfigCache.getCache();
-        MockReferenceConfig config = buildMockReferenceConfig("FooService", "group1", "1.0.0");
-        String value = cache.get(config);
-        assertTrue(config.isGetMethodRun());
-        assertEquals("0", value);
-
-        cache = ReferenceConfigCache.getCache("foo");
-        config = buildMockReferenceConfig("FooService", "group1", "1.0.0");
-        value = cache.get(config);
-        // still init for the same ReferenceConfig if the cache is different
-        assertTrue(config.isGetMethodRun());
-        assertEquals("1", value);
-    }
-
-    @Test
-    public void testDestroy() throws Exception {
-        ReferenceConfigCache cache = ReferenceConfigCache.getCache();
-        MockReferenceConfig config = buildMockReferenceConfig("FooService", "group1", "1.0.0");
-        cache.get(config);
-        MockReferenceConfig configCopy = buildMockReferenceConfig("XxxService", "group1", "1.0.0");
-        cache.get(configCopy);
-        assertEquals(2, cache.cache.size());
-        cache.destroy(config);
-        assertTrue(config.isDestroyMethodRun());
-        assertEquals(1, cache.cache.size());
-        cache.destroy(configCopy);
-        assertTrue(configCopy.isDestroyMethodRun());
-        assertEquals(0, cache.cache.size());
-    }
-
-    @Test
-    public void testDestroyAll() throws Exception {
-        ReferenceConfigCache cache = ReferenceConfigCache.getCache();
-        MockReferenceConfig config = buildMockReferenceConfig("FooService", "group1", "1.0.0");
-        cache.get(config);
-        MockReferenceConfig configCopy = buildMockReferenceConfig("XxxService", "group1", "1.0.0");
-        cache.get(configCopy);
-        assertEquals(2, cache.cache.size());
-        cache.destroyAll();
-        assertTrue(config.isDestroyMethodRun());
-        assertTrue(configCopy.isDestroyMethodRun());
-        assertEquals(0, cache.cache.size());
-    }
-
-    private MockReferenceConfig buildMockReferenceConfig(String service, String group, String version) {
-        MockReferenceConfig config = new MockReferenceConfig();
-        config.setInterface(service);
-        config.setGroup(group);
-        config.setVersion(version);
-        return config;
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationParameter.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationParameter.java
deleted file mode 100644
index 65f77de..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationParameter.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.validation;
-
-import javax.validation.constraints.Future;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Past;
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * ValidationParameter
- */
-public class ValidationParameter implements Serializable {
-
-    private static final long serialVersionUID = 7158911668568000392L;
-
-    @NotNull(groups = ValidationService.Update.class)
-    private Integer id;
-
-    @NotNull
-    @Size(min = 2, max = 20)
-    private String name;
-
-    // not allow to save null, but allow to update with null which means not update the field
-    @NotNull(groups = ValidationService.Save.class)
-    @Pattern(regexp = "^\\s*\\w+(?:\\.{0,1}[\\w-]+)*@[a-zA-Z0-9]+(?:[-.][a-zA-Z0-9]+)*\\.[a-zA-Z]+\\s*$")
-    private String email;
-
-    @Min(18)
-    @Max(100)
-    private int age;
-
-    @Past
-    private Date loginDate;
-
-    @Future
-    private Date expiryDate;
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getEmail() {
-        return email;
-    }
-
-    public void setEmail(String email) {
-        this.email = email;
-    }
-
-    public int getAge() {
-        return age;
-    }
-
-    public void setAge(int age) {
-        this.age = age;
-    }
-
-    public Date getLoginDate() {
-        return loginDate;
-    }
-
-    public void setLoginDate(Date loginDate) {
-        this.loginDate = loginDate;
-    }
-
-    public Date getExpiryDate() {
-        return expiryDate;
-    }
-
-    public void setExpiryDate(Date expiryDate) {
-        this.expiryDate = expiryDate;
-    }
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationService.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationService.java
deleted file mode 100644
index 0af7a2b..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationService.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.validation;
-
-import org.apache.dubbo.validation.MethodValidated;
-
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Pattern;
-import javax.validation.constraints.Size;
-
-
-/**
- * ValidationService
- * <p>
- * Use service interface to distinguish validation scenario, for example: @NotNull(groups = ValidationService.class)
- */
-public interface ValidationService {
-
-    /**
-     * The current logic will not verify 'groups = ValidationService.Save.class' if
-     * '@MethodValidated(ValidationService.Save.class)' is not present
-     *
-     * @param parameter
-     */
-    @MethodValidated(Save.class)
-    void save(ValidationParameter parameter);
-
-    void update(ValidationParameter parameter);
-
-    void delete(@Min(1) long id, @NotNull @Size(min = 2, max = 16) @Pattern(regexp = "^[a-zA-Z]+$") String operator);
-
-    /**
-     * Assume both id and email are needed to pass in, need to verify Save group and Update group.
-     *
-     * @param parameter
-     */
-    @MethodValidated({Save.class, Update.class})
-    void relatedQuery(ValidationParameter parameter);
-
-    /**
-     * annotation which has the same name with the method but has the first letter in capital
-     * used for distinguish validation scenario, for example: @NotNull(groups = ValidationService.Save.class)
-     * optional
-     */
-    @interface Save {
-    }
-
-    /**
-     * annotation which has the same name with the method but has the first letter in capital
-     * used for distinguish validation scenario, for example: @NotNull(groups = ValidationService.Update.class)
-     * optional
-     */
-    @interface Update {
-    }
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationServiceImpl.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationServiceImpl.java
deleted file mode 100644
index e37197c..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationServiceImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.validation;
-
-/**
- * ValidationServiceImpl
- */
-public class ValidationServiceImpl implements ValidationService {
-
-    public void save(ValidationParameter parameter) {
-    }
-
-    public void update(ValidationParameter parameter) {
-    }
-
-    public void delete(long id, String operator) {
-    }
-
-    public void relatedQuery(ValidationParameter parameter){
-
-    }
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationTest.java b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationTest.java
deleted file mode 100644
index 45d8c27..0000000
--- a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/validation/ValidationTest.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.config.validation;
-
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ProtocolConfig;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.rpc.RpcException;
-import org.apache.dubbo.rpc.service.GenericException;
-import org.apache.dubbo.rpc.service.GenericService;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import javax.validation.ConstraintViolation;
-import javax.validation.ConstraintViolationException;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * GenericServiceTest
- */
-public class ValidationTest {
-
-    @Test
-    public void testValidation() {
-        ServiceConfig<ValidationService> service = new ServiceConfig<ValidationService>();
-        service.setApplication(new ApplicationConfig("validation-provider"));
-        service.setRegistry(new RegistryConfig("N/A"));
-        service.setProtocol(new ProtocolConfig("dubbo", 29582));
-        service.setInterface(ValidationService.class.getName());
-        service.setRef(new ValidationServiceImpl());
-        service.setValidation(String.valueOf(true));
-        service.export();
-        try {
-            ReferenceConfig<ValidationService> reference = new ReferenceConfig<ValidationService>();
-            reference.setApplication(new ApplicationConfig("validation-consumer"));
-            reference.setInterface(ValidationService.class);
-            reference.setUrl("dubbo://127.0.0.1:29582?scope=remote&validation=true");
-            ValidationService validationService = reference.get();
-            try {
-                // Save OK
-                ValidationParameter parameter = new ValidationParameter();
-                parameter.setName("liangfei");
-                parameter.setEmail("liangfei@liang.fei");
-                parameter.setAge(50);
-                parameter.setLoginDate(new Date(System.currentTimeMillis() - 1000000));
-                parameter.setExpiryDate(new Date(System.currentTimeMillis() + 1000000));
-                validationService.save(parameter);
-
-                try {
-                    parameter = new ValidationParameter();
-                    parameter.setName("l");
-                    parameter.setEmail("liangfei@liang.fei");
-                    parameter.setAge(50);
-                    parameter.setLoginDate(new Date(System.currentTimeMillis() - 1000000));
-                    parameter.setExpiryDate(new Date(System.currentTimeMillis() + 1000000));
-                    validationService.save(parameter);
-                    Assert.fail();
-                } catch (ConstraintViolationException ve) {
-                    Set<ConstraintViolation<?>> violations = ve.getConstraintViolations();
-                    Assert.assertNotNull(violations);
-                }
-
-                // verify save group, save error
-                try {
-                    parameter = new ValidationParameter();
-                    parameter.setName("liangfei");
-                    parameter.setAge(50);
-                    parameter.setLoginDate(new Date(System.currentTimeMillis() - 1000000));
-                    parameter.setExpiryDate(new Date(System.currentTimeMillis() + 1000000));
-                    validationService.save(parameter);
-                    Assert.fail();
-                } catch (ConstraintViolationException ve) {
-                    Set<ConstraintViolation<?>> violations = ve.getConstraintViolations();
-                    Assert.assertNotNull(violations);
-                }
-
-                // relatedQuery error, no id and email is passed, will trigger validation exception for both Save
-                // and Update
-                try {
-                    parameter = new ValidationParameter();
-                    parameter.setName("liangfei");
-                    parameter.setAge(50);
-                    parameter.setLoginDate(new Date(System.currentTimeMillis() - 1000000));
-                    parameter.setExpiryDate(new Date(System.currentTimeMillis() + 1000000));
-                    validationService.relatedQuery(parameter);
-                    Assert.fail();
-                } catch (ConstraintViolationException ve) {
-                    Set<ConstraintViolation<?>> violations = ve.getConstraintViolations();
-                    Assert.assertEquals(violations.size(),2);
-                }
-
-                // Save Error
-                try {
-                    parameter = new ValidationParameter();
-                    validationService.save(parameter);
-                    Assert.fail();
-                } catch (ConstraintViolationException ve) {
-                    Set<ConstraintViolation<?>> violations = ve.getConstraintViolations();
-                    Assert.assertTrue(violations.size() == 3);
-                    Assert.assertNotNull(violations);
-                }
-
-                // Delete OK
-                validationService.delete(2, "abc");
-
-                // Delete Error
-                try {
-                    validationService.delete(2, "a");
-                    Assert.fail();
-                } catch (ConstraintViolationException ve) {
-                    Set<ConstraintViolation<?>> violations = ve.getConstraintViolations();
-                    Assert.assertNotNull(violations);
-                    Assert.assertEquals(1, violations.size());
-                }
-
-                // Delete Error
-                try {
-                    validationService.delete(0, "abc");
-                    Assert.fail();
-                } catch (ConstraintViolationException ve) {
-                    Set<ConstraintViolation<?>> violations = ve.getConstraintViolations();
-                    Assert.assertNotNull(violations);
-                    Assert.assertEquals(1, violations.size());
-                }
-                try {
-                    validationService.delete(2, null);
-                    Assert.fail();
-                } catch (ConstraintViolationException ve) {
-                    Set<ConstraintViolation<?>> violations = ve.getConstraintViolations();
-                    Assert.assertNotNull(violations);
-                    Assert.assertEquals(1, violations.size());
-                }
-                try {
-                    validationService.delete(0, null);
-                    Assert.fail();
-                } catch (ConstraintViolationException ve) {
-                    Set<ConstraintViolation<?>> violations = ve.getConstraintViolations();
-                    Assert.assertNotNull(violations);
-                    Assert.assertEquals(2, violations.size());
-                }
-            } finally {
-                reference.destroy();
-            }
-        } finally {
-            service.unexport();
-        }
-    }
-
-    @Test
-    public void testProviderValidation() {
-        ServiceConfig<ValidationService> service = new ServiceConfig<ValidationService>();
-        service.setApplication(new ApplicationConfig("validation-provider"));
-        service.setRegistry(new RegistryConfig("N/A"));
-        service.setProtocol(new ProtocolConfig("dubbo", 29582));
-        service.setInterface(ValidationService.class.getName());
-        service.setRef(new ValidationServiceImpl());
-        service.setValidation(String.valueOf(true));
-        service.export();
-        try {
-            ReferenceConfig<ValidationService> reference = new ReferenceConfig<ValidationService>();
-            reference.setApplication(new ApplicationConfig("validation-consumer"));
-            reference.setInterface(ValidationService.class);
-            reference.setUrl("dubbo://127.0.0.1:29582");
-            ValidationService validationService = reference.get();
-            try {
-                // Save OK
-                ValidationParameter parameter = new ValidationParameter();
-                parameter.setName("liangfei");
-                parameter.setEmail("liangfei@liang.fei");
-                parameter.setAge(50);
-                parameter.setLoginDate(new Date(System.currentTimeMillis() - 1000000));
-                parameter.setExpiryDate(new Date(System.currentTimeMillis() + 1000000));
-                validationService.save(parameter);
-
-                // Save Error
-                try {
-                    parameter = new ValidationParameter();
-                    validationService.save(parameter);
-                    Assert.fail();
-                } catch (RpcException e) {
-                    Assert.assertTrue(e.getMessage().contains("ConstraintViolation"));
-                }
-
-                // Delete OK
-                validationService.delete(2, "abc");
-
-                // Delete Error
-                try {
-                    validationService.delete(0, "abc");
-                    Assert.fail();
-                } catch (RpcException e) {
-                    Assert.assertTrue(e.getMessage().contains("ConstraintViolation"));
-                }
-                try {
-                    validationService.delete(2, null);
-                    Assert.fail();
-                } catch (RpcException e) {
-                    Assert.assertTrue(e.getMessage().contains("ConstraintViolation"));
-                }
-                try {
-                    validationService.delete(0, null);
-                    Assert.fail();
-                } catch (RpcException e) {
-                    Assert.assertTrue(e.getMessage().contains("ConstraintViolation"));
-                }
-            } finally {
-                reference.destroy();
-            }
-        } finally {
-            service.unexport();
-        }
-    }
-
-    @Test
-    public void testGenericValidation() {
-        ServiceConfig<ValidationService> service = new ServiceConfig<ValidationService>();
-        service.setApplication(new ApplicationConfig("validation-provider"));
-        service.setRegistry(new RegistryConfig("N/A"));
-        service.setProtocol(new ProtocolConfig("dubbo", 29582));
-        service.setInterface(ValidationService.class.getName());
-        service.setRef(new ValidationServiceImpl());
-        service.setValidation(String.valueOf(true));
-        service.export();
-        try {
-            ReferenceConfig<GenericService> reference = new ReferenceConfig<GenericService>();
-            reference.setApplication(new ApplicationConfig("validation-consumer"));
-            reference.setInterface(ValidationService.class.getName());
-            reference.setUrl("dubbo://127.0.0.1:29582?scope=remote&validation=true&timeout=9000000");
-            reference.setGeneric(true);
-            GenericService validationService = reference.get();
-            try {
-                // Save OK
-                Map<String, Object> parameter = new HashMap<String, Object>();
-                parameter.put("name", "liangfei");
-                parameter.put("Email", "liangfei@liang.fei");
-                parameter.put("Age", 50);
-                parameter.put("LoginDate", new Date(System.currentTimeMillis() - 1000000));
-                parameter.put("ExpiryDate", new Date(System.currentTimeMillis() + 1000000));
-                validationService.$invoke("save", new String[]{ValidationParameter.class.getName()}, new Object[]{parameter});
-
-                // Save Error
-                try {
-                    parameter = new HashMap<String, Object>();
-                    validationService.$invoke("save", new String[]{ValidationParameter.class.getName()}, new Object[]{parameter});
-                    Assert.fail();
-                } catch (GenericException e) {
-                    Assert.assertTrue(e.getMessage().contains("Failed to validate service"));
-                }
-
-                // Delete OK
-                validationService.$invoke("delete", new String[]{long.class.getName(), String.class.getName()}, new Object[]{2, "abc"});
-
-                // Delete Error
-                try {
-                    validationService.$invoke("delete", new String[]{long.class.getName(), String.class.getName()}, new Object[]{0, "abc"});
-                    Assert.fail();
-                } catch (GenericException e) {
-                    Assert.assertTrue(e.getMessage().contains("Failed to validate service"));
-                }
-                try {
-                    validationService.$invoke("delete", new String[]{long.class.getName(), String.class.getName()}, new Object[]{2, null});
-                    Assert.fail();
-                } catch (GenericException e) {
-                    Assert.assertTrue(e.getMessage().contains("Failed to validate service"));
-                }
-                try {
-                    validationService.$invoke("delete", new String[]{long.class.getName(), String.class.getName()}, new Object[]{0, null});
-                    Assert.fail();
-                } catch (GenericException e) {
-                    Assert.assertTrue(e.getMessage().contains("Failed to validate service"));
-                }
-            } catch (GenericException e) {
-                Assert.assertTrue(e.getMessage().contains("Failed to validate service"));
-            } finally {
-                reference.destroy();
-            }
-        } finally {
-            service.unexport();
-        }
-    }
-
-}
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.common.status.StatusChecker b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.common.status.StatusChecker
deleted file mode 100644
index d7d3b44..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.common.status.StatusChecker
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-mockstatuschecker=org.apache.dubbo.config.mock.MockStatusChecker
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.common.threadpool.ThreadPool b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.common.threadpool.ThreadPool
deleted file mode 100644
index f4f5d34..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.common.threadpool.ThreadPool
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-mockthreadpool=org.apache.dubbo.config.mock.MockThreadPool
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.registry.RegistryFactory b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.registry.RegistryFactory
deleted file mode 100644
index 371c74d..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.registry.RegistryFactory
+++ /dev/null
@@ -1,2 +0,0 @@
-mockregistry=org.apache.dubbo.config.mock.MockRegistryFactory
-mockprotocol2=org.apache.dubbo.config.mock.MockRegistryFactory2
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.Codec b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.Codec
deleted file mode 100644
index 94f7668..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.Codec
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-mockcodec=org.apache.dubbo.config.mock.MockCodec
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.Dispatcher b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.Dispatcher
deleted file mode 100644
index febb4f8..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.Dispatcher
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-mockdispatcher=org.apache.dubbo.config.mock.MockDispatcher
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.Transporter b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.Transporter
deleted file mode 100644
index ef9ec51..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.Transporter
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-mocktransporter=org.apache.dubbo.config.mock.MockTransporter
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.exchange.Exchanger b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.exchange.Exchanger
deleted file mode 100644
index f8d3c3b..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.exchange.Exchanger
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-mockexchanger=org.apache.dubbo.config.mock.MockExchanger
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.telnet.TelnetHandler b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.telnet.TelnetHandler
deleted file mode 100644
index 76dfd94..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.remoting.telnet.TelnetHandler
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-mocktelnethandler=org.apache.dubbo.config.mock.MockTelnetHandler
-
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.ExporterListener b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.ExporterListener
deleted file mode 100644
index f9c818d..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.ExporterListener
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-mockexporterlistener=org.apache.dubbo.config.mock.MockExporterListener
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.Filter b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.Filter
deleted file mode 100644
index 1938f96..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.Filter
+++ /dev/null
@@ -1 +0,0 @@
-mockfilter=org.apache.dubbo.config.mock.MockFilter
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.InvokerListener b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.InvokerListener
deleted file mode 100644
index 9e6d042..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.InvokerListener
+++ /dev/null
@@ -1 +0,0 @@
-mockinvokerlistener=org.apache.dubbo.config.mock.MockInvokerListener
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.Protocol b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.Protocol
deleted file mode 100644
index 6c04497..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.Protocol
+++ /dev/null
@@ -1,2 +0,0 @@
-mockprotocol=org.apache.dubbo.config.mock.MockProtocol
-mockprotocol2=org.apache.dubbo.config.mock.MockProtocol2
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.ProxyFactory b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.ProxyFactory
deleted file mode 100644
index ded1b88..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.ProxyFactory
+++ /dev/null
@@ -1,2 +0,0 @@
-mockproxyfactory=org.apache.dubbo.config.mock.MockProxyFactory
-testproxyfactory=org.apache.dubbo.config.mock.TestProxyFactory
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.cluster.Cluster b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.cluster.Cluster
deleted file mode 100644
index 066d136..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.cluster.Cluster
+++ /dev/null
@@ -1 +0,0 @@
-mockcluster=org.apache.dubbo.config.mock.MockCluster
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.cluster.LoadBalance b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.cluster.LoadBalance
deleted file mode 100644
index 23b5087..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.cluster.LoadBalance
+++ /dev/null
@@ -1 +0,0 @@
-mockloadbalance=org.apache.dubbo.config.mock.MockLoadBalance
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/resources/log4j.xml b/dubbo-config/dubbo-config-api/src/test/resources/log4j.xml
deleted file mode 100644
index 4a9fe2e..0000000
--- a/dubbo-config/dubbo-config-api/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n"/>
-        </layout>
-    </appender>
-    <root>
-        <level value="INFO"/>
-        <appender-ref ref="CONSOLE"/>
-    </root>
-</log4j:configuration>
\ No newline at end of file


[incubator-dubbo] 07/07: Changes on demo, for test purpose.

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch dev-metadata
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git

commit e6e66894cb1dd94b8aeea4b69c4fd441b154436f
Author: ken.lj <ke...@gmail.com>
AuthorDate: Tue Oct 30 18:14:45 2018 +0800

    Changes on demo, for test purpose.
---
 dubbo-demo/dubbo-demo-consumer/pom.xml                              | 4 ++++
 .../src/main/resources/META-INF/spring/dubbo-demo-consumer.xml      | 6 +++---
 .../src/main/resources/META-INF/spring/dubbo-demo-provider.xml      | 5 +++--
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/dubbo-demo/dubbo-demo-consumer/pom.xml b/dubbo-demo/dubbo-demo-consumer/pom.xml
index 63a94bd..2f78b94 100644
--- a/dubbo-demo/dubbo-demo-consumer/pom.xml
+++ b/dubbo-demo/dubbo-demo-consumer/pom.xml
@@ -66,5 +66,9 @@
             <groupId>org.apache.dubbo</groupId>
             <artifactId>dubbo-metadata-report-redis</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-metadata-report-zookeeper</artifactId>
+        </dependency>
     </dependencies>
 </project>
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-consumer.xml b/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-consumer.xml
index 167e0df..0216a13 100644
--- a/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-consumer.xml
+++ b/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-consumer.xml
@@ -30,10 +30,10 @@
     </dubbo:application>
 
     <!-- use multicast registry center to discover service -->
-    <dubbo:registry group="dubboregistrygroup1" address="zookeeper://127.0.0.1:2181" default="true"/>
-    <dubbo:registry group="dubboregistrygroup1" address="zookeeper://127.0.0.1:2181"/>
+    <dubbo:registry address="zookeeper://127.0.0.1:2181" default="true"/>
+    <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
 
-    <dubbo:servicestore address="redis://127.0.0.1:6379"/>
+    <dubbo:servicestore address="zookeeper://127.0.0.1:2181"/>
 
     <!-- generate proxy for the remote service, then demoService can be used in the same way as the
     local regular interface -->
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml b/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml
index 01ccd6f..4e4a744 100644
--- a/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml
+++ b/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml
@@ -26,9 +26,10 @@
     <!--<dubbo:provider tag="tag3"/>-->
 
     <!-- use multicast registry center to export service -->
-    <dubbo:registry group="dubboregistrygroup1" address="zookeeper://127.0.0.1:2181" simple="false">
+    <!--<dubbo:registry group="dubboregistrygroup1" address="zookeeper://127.0.0.1:2181" simple="false">
         <dubbo:parameter key="config.check" value="false"/>
-    </dubbo:registry>
+    </dubbo:registry>-->
+    <dubbo:registry group="dubboregistrygroup1" address="zookeeper://127.0.0.1:2181"/>
 
     <dubbo:servicestore address="zookeeper://127.0.0.1:2181"/>