[Dubbo-7367]fix too many instance bean created (#7438)
author张远征hd <zhangyzhd@163.com>
Fri, 2 Apr 2021 08:07:18 +0000 (16:07 +0800)
committerGitHub <noreply@github.com>
Fri, 2 Apr 2021 08:07:18 +0000 (16:07 +0800)
commit23397290073381c0024706c935072dae457a5742
tree7e1d2b32cdf42acb6838723f4f017e816c2384a4
parent5692210778b78073cd5220af5efc3c05bb77d3d8
[Dubbo-7367]fix too many instance bean created (#7438)

1,修复相同parameters当产生多个Reference的问题。
2,如果相同服务以不同参数订阅多次,则启动时增加WARN日志

* Update ReferenceAnnotationBeanPostProcessor.java

修改日志格式

* Update ReferenceAnnotationBeanPostProcessor.java

release referencedBeanNameIdx after used.

* Update ReferenceAnnotationBeanPostProcessorTest.java

add UT

* Update ReferenceAnnotationBeanPostProcessor.java

只处理String类型的array,对Method[]暂时不处理

* 优化generateReferenceBeanName

支持处理methods属性和arguments属性

* methods和arguments需要排序

* Update ReferenceAnnotationUtils.java

use lambda

* update ServiceInstancesChangedListener

调整ServiceInstancesChangedListener的事件通知。所有的directory都能通知到

* Update ServiceInstancesChangedListener.java

listeners内部改为HashSet

* update generateReferenceBeanName

generateReferenceBeanName改用3.0-preview逻辑

* remote println

* Update ReferenceAnnotationBeanPostProcessor.java

remote unused private method

* Update ReferenceAnnotationBeanPostProcessor.java

* Update ReferenceAnnotationBeanPostProcessorTest.java

update UT

* update UT

* revert to use ReferenceAnnotationUtils

* 使用来自kylixs的convertAttribute方法

* organize imports & update UT

* update UT

* update ReferenceAnnotationBeanPostProcessor & UT
dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ReferenceAnnotationBeanPostProcessor.java
dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/beans/factory/annotation/ReferenceAnnotationBeanPostProcessorTest.java
dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java
dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/ServiceInstancesChangedListener.java