Skip to content

Commit

Permalink
[Feature] Generic Type injection (apache#6761)
Browse files Browse the repository at this point in the history
* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* 2.7.8 service introspection (#6300)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* 2.7.8 service introspection update (#6308)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* 2.7.8 service introspection (#6317)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* 2.7.8 service introspection (#6337)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* Polish apache/dubbo#6170 : [Feature] Introducing the externalized configuration for ServiceNameMapping

* Polish apache/dubbo#6342 : [Enhancement] Introducing the composite ServiceNameMapping

* Refactor

* Polish apache/dubbo#6172 : [Feature] Adding the "services" attribute methods into @DubboReference

* Polish apache/dubbo#6173 : [Feature] Adding the "services" attribute into <dubbo:reference> element

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6252

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6224 : Filter chain was not invoked with local calls since v2.7.6

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* 2.7.8 service introspection (#6366)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* Polish apache/dubbo#6170 : [Feature] Introducing the externalized configuration for ServiceNameMapping

* Polish apache/dubbo#6342 : [Enhancement] Introducing the composite ServiceNameMapping

* Refactor

* Polish apache/dubbo#6172 : [Feature] Adding the "services" attribute methods into @DubboReference

* Polish apache/dubbo#6173 : [Feature] Adding the "services" attribute into <dubbo:reference> element

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6252

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6224 : Filter chain was not invoked with local calls since v2.7.6

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : Adding META-INF/dubbo/internal/org.apache.dubbo.metadata.MetadataServiceExporter

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* 2.7.8 Test Cases (#6384)

* Polish apache/dubbo#6152

* Polish apache/dubbo#6174 : [Enhancement] Registering the common beans for Spring XML meta-configuration

* Polish apache/dubbo#6174 : Fixing the test-cases

* Polish apache/dubbo#6174 : Fixing the test-cases

* Add the test-case for multiple services with MethodConfigs

* Fixed the test-cases

* 2.7.8 Dev (#6386)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* sync wait netty server to finish shutdown (#6281)

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* maybe we can remove null judge in this case (#6321)

* update

* update

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* Polish apache/dubbo#6170 : [Feature] Introducing the externalized configuration for ServiceNameMapping

* Polish apache/dubbo#6342 : [Enhancement] Introducing the composite ServiceNameMapping

* Refactor

* fix method name typo in JValidator.java (#6344)

* [Dubbo-6340]fix application cannot exit when use consul registry (#6341)

* fix application cannot exit when use consul registry

* make consul registry suppor ACL (#6313)

* make consul registry suppor ACL

* Polish apache/dubbo#6172 : [Feature] Adding the "services" attribute methods into @DubboReference

* Polish apache/dubbo#6173 : [Feature] Adding the "services" attribute into <dubbo:reference> element

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* fix publish null value when use consul config center (#6351)

* fix publish null value when use consul config center

* Polish apache/dubbo#6252

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6224 : Filter chain was not invoked with local calls since v2.7.6

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : Adding META-INF/dubbo/internal/org.apache.dubbo.metadata.MetadataServiceExporter

* fix the priority of ListenableRouter were not effective (#6148)

fixes #4822

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* when the url is generic, the log level should be info (#6363)

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* fix NPE when check=false is set and provider is empty. (#6376)

fixes #6228

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* fix #6306.  support TypeBuilder sort (#6365)

* fix #6306. support TypeBuilder sort

* fix #6306. support TypeBuilder sort

* fix #6306. support TypeBuilder sort

* remove unused import

* add license for test file

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* enhance ClusterInvoker & ExtensionLoader (#6343)

- Introduce ClusterInvoker to better support multiple registries subscription
- Wrapper sort and enable/disable
- some small fixes

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Fixed the test-cases

Co-authored-by: tswstarplanet <tswstarplanet@apache.org>
Co-authored-by: Nine <nine.yang.coding@gmail.com>
Co-authored-by: 陈哈哈 <chenyongjia365@outlook.com>
Co-authored-by: luoning810 <18311333766@163.com>
Co-authored-by: cvictory <shenglicao2@gmail.com>
Co-authored-by: ken.lj <ken.lj.hz@gmail.com>

* Fixes the issue of merging code in Github

* Polish apache/dubbo#6389 : [Issue] Resolving the issues with ConsulServiceDiscovery

* Fixes the test-cases

* Fixes the test-cases

* Fixes the test-cases

* Upgrade the release version to be 2.7.8

* Upgrade the release version to be 2.7.8 (#6411)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* 2.7.8 service introspection (#6300)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* 2.7.8 service introspection update (#6308)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* 2.7.8 service introspection (#6317)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* 2.7.8 service introspection (#6337)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* Polish apache/dubbo#6170 : [Feature] Introducing the externalized configuration for ServiceNameMapping

* Polish apache/dubbo#6342 : [Enhancement] Introducing the composite ServiceNameMapping

* Refactor

* Polish apache/dubbo#6172 : [Feature] Adding the "services" attribute methods into @DubboReference

* Polish apache/dubbo#6173 : [Feature] Adding the "services" attribute into <dubbo:reference> element

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6252

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6224 : Filter chain was not invoked with local calls since v2.7.6

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* 2.7.8 service introspection (#6366)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* Polish apache/dubbo#6170 : [Feature] Introducing the externalized configuration for ServiceNameMapping

* Polish apache/dubbo#6342 : [Enhancement] Introducing the composite ServiceNameMapping

* Refactor

* Polish apache/dubbo#6172 : [Feature] Adding the "services" attribute methods into @DubboReference

* Polish apache/dubbo#6173 : [Feature] Adding the "services" attribute into <dubbo:reference> element

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6252

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6224 : Filter chain was not invoked with local calls since v2.7.6

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : Adding META-INF/dubbo/internal/org.apache.dubbo.metadata.MetadataServiceExporter

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* 2.7.8 Test Cases (#6384)

* Polish apache/dubbo#6152

* Polish apache/dubbo#6174 : [Enhancement] Registering the common beans for Spring XML meta-configuration

* Polish apache/dubbo#6174 : Fixing the test-cases

* Polish apache/dubbo#6174 : Fixing the test-cases

* Add the test-case for multiple services with MethodConfigs

* Fixed the test-cases

* 2.7.8 Dev (#6386)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* sync wait netty server to finish shutdown (#6281)

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* maybe we can remove null judge in this case (#6321)

* update

* update

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* Polish apache/dubbo#6170 : [Feature] Introducing the externalized configuration for ServiceNameMapping

* Polish apache/dubbo#6342 : [Enhancement] Introducing the composite ServiceNameMapping

* Refactor

* fix method name typo in JValidator.java (#6344)

* [Dubbo-6340]fix application cannot exit when use consul registry (#6341)

* fix application cannot exit when use consul registry

* make consul registry suppor ACL (#6313)

* make consul registry suppor ACL

* Polish apache/dubbo#6172 : [Feature] Adding the "services" attribute methods into @DubboReference

* Polish apache/dubbo#6173 : [Feature] Adding the "services" attribute into <dubbo:reference> element

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* fix publish null value when use consul config center (#6351)

* fix publish null value when use consul config center

* Polish apache/dubbo#6252

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6224 : Filter chain was not invoked with local calls since v2.7.6

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : Adding META-INF/dubbo/internal/org.apache.dubbo.metadata.MetadataServiceExporter

* fix the priority of ListenableRouter were not effective (#6148)

fixes #4822

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* when the url is generic, the log level should be info (#6363)

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* fix NPE when check=false is set and provider is empty. (#6376)

fixes #6228

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* fix #6306.  support TypeBuilder sort (#6365)

* fix #6306. support TypeBuilder sort

* fix #6306. support TypeBuilder sort

* fix #6306. support TypeBuilder sort

* remove unused import

* add license for test file

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* enhance ClusterInvoker & ExtensionLoader (#6343)

- Introduce ClusterInvoker to better support multiple registries subscription
- Wrapper sort and enable/disable
- some small fixes

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Fixed the test-cases

Co-authored-by: tswstarplanet <tswstarplanet@apache.org>
Co-authored-by: Nine <nine.yang.coding@gmail.com>
Co-authored-by: 陈哈哈 <chenyongjia365@outlook.com>
Co-authored-by: luoning810 <18311333766@163.com>
Co-authored-by: cvictory <shenglicao2@gmail.com>
Co-authored-by: ken.lj <ken.lj.hz@gmail.com>

* Fixes the issue of merging code in Github

* Polish apache/dubbo#6389 : [Issue] Resolving the issues with ConsulServiceDiscovery

* Fixes the test-cases

* Fixes the test-cases

* Fixes the test-cases

* Upgrade the release version to be 2.7.8

Co-authored-by: tswstarplanet <tswstarplanet@apache.org>
Co-authored-by: Nine <nine.yang.coding@gmail.com>
Co-authored-by: 陈哈哈 <chenyongjia365@outlook.com>
Co-authored-by: luoning810 <18311333766@163.com>
Co-authored-by: cvictory <shenglicao2@gmail.com>
Co-authored-by: ken.lj <ken.lj.hz@gmail.com>

* Polish apache/dubbo#6261 : Migration the latest Nacos registry implementation to upstream

* Polish apache/dubbo#6425 : [Infrastructure] Upgrading the spring-context-support to be 1.0.7

* Hessian2 whitelist (#6378) (#6415)

* Hessian2 whitelist (#6378)

fixes #6364

* Hessian whitelist2 (#6423)

* double check lock (#6422)

* Correction: comments about multipleConfig (#6414)

Co-authored-by: ken.lj <ken.lj.hz@gmail.com>
Co-authored-by: diguage <leejun119@gmail.com>
Co-authored-by: 月泉 <yuequan1997@gmail.com>

* Polish apache/dubbo#6418 : Rest Protocol can't work when use Tomcat 9.0.x as web container for Dubbo 2.7.7

* [2.7.8] Migration the latest Nacos registry implementation to upstream (#6417)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* 2.7.8 service introspection (#6300)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* 2.7.8 service introspection update (#6308)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* 2.7.8 service introspection (#6317)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* 2.7.8 service introspection (#6337)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* Polish apache/dubbo#6170 : [Feature] Introducing the externalized configuration for ServiceNameMapping

* Polish apache/dubbo#6342 : [Enhancement] Introducing the composite ServiceNameMapping

* Refactor

* Polish apache/dubbo#6172 : [Feature] Adding the "services" attribute methods into @DubboReference

* Polish apache/dubbo#6173 : [Feature] Adding the "services" attribute into <dubbo:reference> element

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6252

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6224 : Filter chain was not invoked with local calls since v2.7.6

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* 2.7.8 service introspection (#6366)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* Polish apache/dubbo#6170 : [Feature] Introducing the externalized configuration for ServiceNameMapping

* Polish apache/dubbo#6342 : [Enhancement] Introducing the composite ServiceNameMapping

* Refactor

* Polish apache/dubbo#6172 : [Feature] Adding the "services" attribute methods into @DubboReference

* Polish apache/dubbo#6173 : [Feature] Adding the "services" attribute into <dubbo:reference> element

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6252

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6224 : Filter chain was not invoked with local calls since v2.7.6

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : Adding META-INF/dubbo/internal/org.apache.dubbo.metadata.MetadataServiceExporter

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* 2.7.8 Test Cases (#6384)

* Polish apache/dubbo#6152

* Polish apache/dubbo#6174 : [Enhancement] Registering the common beans for Spring XML meta-configuration

* Polish apache/dubbo#6174 : Fixing the test-cases

* Polish apache/dubbo#6174 : Fixing the test-cases

* Add the test-case for multiple services with MethodConfigs

* Fixed the test-cases

* 2.7.8 Dev (#6386)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* sync wait netty server to finish shutdown (#6281)

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* maybe we can remove null judge in this case (#6321)

* update

* update

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* Polish apache/dubbo#6170 : [Feature] Introducing the externalized configuration for ServiceNameMapping

* Polish apache/dubbo#6342 : [Enhancement] Introducing the composite ServiceNameMapping

* Refactor

* fix method name typo in JValidator.java (#6344)

* [Dubbo-6340]fix application cannot exit when use consul registry (#6341)

* fix application cannot exit when use consul registry

* make consul registry suppor ACL (#6313)

* make consul registry suppor ACL

* Polish apache/dubbo#6172 : [Feature] Adding the "services" attribute methods into @DubboReference

* Polish apache/dubbo#6173 : [Feature] Adding the "services" attribute into <dubbo:reference> element

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* Polish apache/dubbo#6346 : [Issue] Merging all subscribied URLs from the multiple services

* fix publish null value when use consul config center (#6351)

* fix publish null value when use consul config center

* Polish apache/dubbo#6252

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6356 & apache/dubbo#6171

* Polish apache/dubbo#6224 : Filter chain was not invoked with local calls since v2.7.6

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : Adding META-INF/dubbo/internal/org.apache.dubbo.metadata.MetadataServiceExporter

* fix the priority of ListenableRouter were not effective (#6148)

fixes #4822

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* when the url is generic, the log level should be info (#6363)

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* fix NPE when check=false is set and provider is empty. (#6376)

fixes #6228

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* fix #6306.  support TypeBuilder sort (#6365)

* fix #6306. support TypeBuilder sort

* fix #6306. support TypeBuilder sort

* fix #6306. support TypeBuilder sort

* remove unused import

* add license for test file

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* enhance ClusterInvoker & ExtensionLoader (#6343)

- Introduce ClusterInvoker to better support multiple registries subscription
- Wrapper sort and enable/disable
- some small fixes

* Polish apache/dubbo#6322 : [Enhancement] Fix the issues of test-cases after refactoring

* Fixed the test-cases

Co-authored-by: tswstarplanet <tswstarplanet@apache.org>
Co-authored-by: Nine <nine.yang.coding@gmail.com>
Co-authored-by: 陈哈哈 <chenyongjia365@outlook.com>
Co-authored-by: luoning810 <18311333766@163.com>
Co-authored-by: cvictory <shenglicao2@gmail.com>
Co-authored-by: ken.lj <ken.lj.hz@gmail.com>

* Fixes the issue of merging code in Github

* Polish apache/dubbo#6389 : [Issue] Resolving the issues with ConsulServiceDiscovery

* Fixes the test-cases

* Fixes the test-cases

* Fixes the test-cases

* Upgrade the release version to be 2.7.8

* Hessian2 whitelist (#6378)

fixes #6364

* Polish apache/dubbo#6261 : Migration the latest Nacos registry implementation to upstream

* Hessian whitelist2 (#6423)

* Polish apache/dubbo#6425 : [Infrastructure] Upgrading the spring-context-support to be 1.0.7

* double check lock (#6422)

* Correction: comments about multipleConfig (#6414)

* Polish apache/dubbo#6418 : Rest Protocol can't work when use Tomcat 9.0.x as web container for Dubbo 2.7.7

* fix bug: Rest Protocol can't work when use Tomcat as WebContainer (#6402)

Co-authored-by: 01376420 <1qaz!QAZ>

Co-authored-by: tswstarplanet <tswstarplanet@apache.org>
Co-authored-by: Nine <nine.yang.coding@gmail.com>
Co-authored-by: 陈哈哈 <chenyongjia365@outlook.com>
Co-authored-by: luoning810 <18311333766@163.com>
Co-authored-by: cvictory <shenglicao2@gmail.com>
Co-authored-by: ken.lj <ken.lj.hz@gmail.com>
Co-authored-by: diguage <leejun119@gmail.com>
Co-authored-by: 月泉 <yuequan1997@gmail.com>
Co-authored-by: 星尘 <yiocio@126.com>

* 2.7.8 release (#6437)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* 2.7.8 service introspection (#6300)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* 2.7.8 service introspection update (#6308)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* 2.7.8 service introspection (#6317)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* 2.7.8 service introspection (#6337)

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6296 : Adding the new methods into MetadataReport to manipulate the exported URLs for service introspection

* Polish apache/dubbo#6171 : [Feature] Introducing the composite implementation of MetadataService

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert "fix wrong check of InvokerListener when export a service (fix issue_6269) (#6271)"

This reverts commit 91989cae508f8482f31ac335879da4a5975661c8.

* Revert the MetadataReport

* Polish apache/dubbo#6305 : [Refactor] ServiceConfig and ReferenceConfig publish the ServiceDefinition based on the Dubbo Event

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6310 : Refactoring MetadataReport's methods

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6198 : [Issue] Fixing NacosDynamicConfiguration#publishConfig bug

* Polish apache/dubbo#6315 : [Refactor] Refactoring the implementation of MetadataReport based on The Config-Center infrastructure

Deprecated List :

- NacosMetadataReport
- ZookeeperMetadataReport

* Polish apache/dubbo#6315 : Refactoring by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Refactoring ConsulDynamicConfiguration by TreePathDynamicConfiguration

* Polish apache/dubbo#6315 : Reset the config base path to be "metadata" for ConfigCenterBasedMetadataReportFactory

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Bugfix

* Polish apache/dubbo#6315 : Correct words

* Polish apache/dubbo#6333 : [Refactor] Using mandatory implementation of Service Instance registration instead of the event

* Polish apache/dubbo#6336 : [Refactor] org.apache.dubbo.metadata.ServiceNameMapping

* Polish apache/dubbo#6170 : [Feature] Introducing the externaliz…
  • Loading branch information
11 people committed Nov 25, 2020
1 parent 7cfc159 commit 2111385
Show file tree
Hide file tree
Showing 11 changed files with 362 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,10 @@ public synchronized void init() {
return;
}


if (bootstrap == null) {
bootstrap = DubboBootstrap.getInstance();
bootstrap.init();
bootstrap.initialize();
}

checkAndUpdateSubConfigs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,20 @@ public boolean isSingleton() {
* Initializes there Dubbo's Config Beans before @Reference bean autowiring
*/
private void prepareDubboConfigBeans() {
beansOfTypeIncludingAncestors(applicationContext, ApplicationConfig.class);
beansOfTypeIncludingAncestors(applicationContext, ModuleConfig.class);
beansOfTypeIncludingAncestors(applicationContext, RegistryConfig.class);
beansOfTypeIncludingAncestors(applicationContext, ProtocolConfig.class);
beansOfTypeIncludingAncestors(applicationContext, MonitorConfig.class);
beansOfTypeIncludingAncestors(applicationContext, ProviderConfig.class);
beansOfTypeIncludingAncestors(applicationContext, ConsumerConfig.class);
beansOfTypeIncludingAncestors(applicationContext, ConfigCenterBean.class);
beansOfTypeIncludingAncestors(applicationContext, MetadataReportConfig.class);
beansOfTypeIncludingAncestors(applicationContext, MetricsConfig.class);
beansOfTypeIncludingAncestors(applicationContext, SslConfig.class);
// Refactor 2.7.9
final boolean includeNonSingletons = true;
final boolean allowEagerInit = false;
beansOfTypeIncludingAncestors(applicationContext, ApplicationConfig.class, includeNonSingletons, allowEagerInit);
beansOfTypeIncludingAncestors(applicationContext, ModuleConfig.class, includeNonSingletons, allowEagerInit);
beansOfTypeIncludingAncestors(applicationContext, RegistryConfig.class, includeNonSingletons, allowEagerInit);
beansOfTypeIncludingAncestors(applicationContext, ProtocolConfig.class, includeNonSingletons, allowEagerInit);
beansOfTypeIncludingAncestors(applicationContext, MonitorConfig.class, includeNonSingletons, allowEagerInit);
beansOfTypeIncludingAncestors(applicationContext, ProviderConfig.class, includeNonSingletons, allowEagerInit);
beansOfTypeIncludingAncestors(applicationContext, ConsumerConfig.class, includeNonSingletons, allowEagerInit);
beansOfTypeIncludingAncestors(applicationContext, ConfigCenterBean.class, includeNonSingletons, allowEagerInit);
beansOfTypeIncludingAncestors(applicationContext, MetadataReportConfig.class, includeNonSingletons, allowEagerInit);
beansOfTypeIncludingAncestors(applicationContext, MetricsConfig.class, includeNonSingletons, allowEagerInit);
beansOfTypeIncludingAncestors(applicationContext, SslConfig.class, includeNonSingletons, allowEagerInit);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
/*
* 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.spring.beans.factory.config;

import org.apache.dubbo.config.AbstractConfig;
import org.apache.dubbo.config.context.ConfigManager;

import com.alibaba.spring.beans.factory.config.GenericBeanPostProcessorAdapter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.annotation.CommonAnnotationBeanPostProcessor;
import org.springframework.core.PriorityOrdered;

import javax.annotation.PostConstruct;

/**
* Generally, {@link AbstractConfig Dubbo Config} Bean will be added into {@link ConfigManager} on the bean initialization
* life cycle through {@link CommonAnnotationBeanPostProcessor} executing the callback of
* {@link PostConstruct @PostConstruct}. However, the instantiation and initialization of
* {@link AbstractConfig Dubbo Config} Bean could be too early before {@link CommonAnnotationBeanPostProcessor}, e.g,
* execution, thus it's required to register the current instance as a {@link BeanPostProcessor} into
* {@link DefaultListableBeanFactory the BeanFatory} using {@link BeanDefinitionRegistryPostProcessor} as early as
* possible.
*
* @see GenericBeanPostProcessorAdapter
* @since 2.7.9
*/
public class DubboConfigEarlyInitializationPostProcessor extends GenericBeanPostProcessorAdapter<AbstractConfig>
implements BeanDefinitionRegistryPostProcessor, PriorityOrdered {

private static final Log logger = LogFactory.getLog(DubboConfigEarlyInitializationPostProcessor.class.getName());

public static final String BEAN_NAME = "dubboConfigEarlyInitializationPostProcessor";

private DefaultListableBeanFactory beanFactory;

@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
this.beanFactory = unwrap(registry);
initBeanFactory();
}

@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
if (beanFactory == null) { // try again if postProcessBeanDefinitionRegistry method does not effect.
this.beanFactory = unwrap(beanFactory);
initBeanFactory();
}
}

protected void processBeforeInitialization(AbstractConfig config, String beanName) throws BeansException {

if (this.beanFactory == null) {
if (logger.isErrorEnabled()) {
logger.error("Current Processor is not running in Spring container, next action will be skipped!");
}
return;
}

// If CommonAnnotationBeanPostProcessor is already registered, the method addIntoConfigManager()
// will be invoked in Bean life cycle.
if (!hasRegisteredCommonAnnotationBeanPostProcessor()) {
if (logger.isWarnEnabled()) {
logger.warn("CommonAnnotationBeanPostProcessor is not registered yet, " +
"the method addIntoConfigManager() will be invoked directly");
}
config.addIntoConfigManager();
}
}

private DefaultListableBeanFactory unwrap(Object registry) {
if (registry instanceof DefaultListableBeanFactory) {
return (DefaultListableBeanFactory) registry;
}
return null;
}

private void initBeanFactory() {
if (beanFactory != null) {
// Register itself
if (logger.isInfoEnabled()) {
logger.info("BeanFactory is about to be initialized, trying to resolve the Dubbo Config Beans early " +
"initialization");
}
beanFactory.addBeanPostProcessor(this);
}
}

/**
* {@link DefaultListableBeanFactory} has registered {@link CommonAnnotationBeanPostProcessor} or not?
*
* @return if registered, return <code>true</code>, or <code>false</code>
*/
private boolean hasRegisteredCommonAnnotationBeanPostProcessor() {
for (BeanPostProcessor beanPostProcessor : beanFactory.getBeanPostProcessors()) {
if (CommonAnnotationBeanPostProcessor.class.equals(beanPostProcessor.getClass())) {
return true;
}
}
return false;
}

@Override
public int getOrder() {
return HIGHEST_PRECEDENCE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* 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.spring.context;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ApplicationListener;
import org.springframework.context.ConfigurableApplicationContext;

import static org.springframework.util.TypeUtils.isAssignable;

/**
* Dubbo {@link ApplicationListener ApplicationListeners} Registrar
*
* @since 2.7.9
*/
public class DubboApplicationListenerRegistrar implements ApplicationContextAware {

/**
* The bean name of {@link DubboApplicationListenerRegistrar}
*/
public static final String BEAN_NAME = "dubboApplicationListenerRegister";

@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
if (!isAssignable(ConfigurableApplicationContext.class, applicationContext.getClass())) {
throw new IllegalArgumentException("The argument of ApplicationContext must be ConfigurableApplicationContext");
}
addApplicationListeners((ConfigurableApplicationContext) applicationContext);
}

private void addApplicationListeners(ConfigurableApplicationContext context) {
context.addApplicationListener(createDubboBootstrapApplicationListener(context));
context.addApplicationListener(createDubboLifecycleComponentApplicationListener(context));
}

private ApplicationListener<?> createDubboBootstrapApplicationListener(ConfigurableApplicationContext context) {
return new DubboBootstrapApplicationListener(context);
}

private ApplicationListener<?> createDubboLifecycleComponentApplicationListener(ConfigurableApplicationContext context) {
return new DubboLifecycleComponentApplicationListener(context);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import org.apache.dubbo.config.bootstrap.DubboBootstrap;

import com.alibaba.spring.context.OnceApplicationContextEventListener;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ApplicationContextEvent;
import org.springframework.context.event.ContextClosedEvent;
Expand All @@ -30,8 +32,7 @@
*
* @since 2.7.5
*/
public class DubboBootstrapApplicationListener extends OneTimeExecutionApplicationContextEventListener
implements Ordered {
public class DubboBootstrapApplicationListener extends OnceApplicationContextEventListener implements Ordered {

/**
* The bean name of {@link DubboBootstrapApplicationListener}
Expand All @@ -42,7 +43,8 @@ public class DubboBootstrapApplicationListener extends OneTimeExecutionApplicati

private final DubboBootstrap dubboBootstrap;

public DubboBootstrapApplicationListener() {
public DubboBootstrapApplicationListener(ApplicationContext applicationContext) {
super(applicationContext);
this.dubboBootstrap = DubboBootstrap.getInstance();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import org.apache.dubbo.common.context.Lifecycle;

import com.alibaba.spring.context.OnceApplicationContextEventListener;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ApplicationContextEvent;
Expand All @@ -39,7 +40,7 @@
* @see SmartApplicationListener
* @since 2.7.5
*/
public class DubboLifecycleComponentApplicationListener extends OneTimeExecutionApplicationContextEventListener {
public class DubboLifecycleComponentApplicationListener extends OnceApplicationContextEventListener {

/**
* The bean name of {@link DubboLifecycleComponentApplicationListener}
Expand All @@ -50,6 +51,10 @@ public class DubboLifecycleComponentApplicationListener extends OneTimeExecution

private List<Lifecycle> lifecycleComponents = emptyList();

public DubboLifecycleComponentApplicationListener(ApplicationContext applicationContext) {
super(applicationContext);
}

@Override
protected void onApplicationContextEvent(ApplicationContextEvent event) {
if (event instanceof ContextRefreshedEvent) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@

import org.apache.dubbo.config.AbstractConfig;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.AnnotationAttributes;
Expand All @@ -35,7 +39,9 @@
* @see Ordered
* @since 2.5.8
*/
public class DubboConfigConfigurationRegistrar implements ImportBeanDefinitionRegistrar {
public class DubboConfigConfigurationRegistrar implements ImportBeanDefinitionRegistrar, ApplicationContextAware {

private ConfigurableApplicationContext applicationContext;

@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
Expand All @@ -55,4 +61,12 @@ public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, B
// Since 2.7.6
registerCommonBeans(registry);
}

@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
if (!(applicationContext instanceof ConfigurableApplicationContext)) {
throw new IllegalArgumentException("The argument of ApplicationContext must be ConfigurableApplicationContext");
}
this.applicationContext = (ConfigurableApplicationContext) applicationContext;
}
}
Loading

0 comments on commit 2111385

Please sign in to comment.