You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@Reference field can't refer its' @Service Bean in same JVM from v2.6.6 #3695
if (applicationContext.containsBean(referencedBeanName)) { // Is local @Service Bean or not ?
// ReferenceBeanInvocationHandler's initialization has to wait for current local @Service Bean has been exported.
localReferenceBeanInvocationHandlerCache.put(referencedBeanName, handler);
} else {
// Remote Reference Bean should initialize immediately
handler.init();
}
会进行判断, 如果是内部 service, 则 reference 会等待 service export 之后再 init.
而在 2.6.6 中, 上面代码失效了.
原因在于 2.6.6 使用了 AnnotationBeanNameBuilder 来给 service 和 reference 命名, 化分了不同前缀, 导致同一个项目里 reference 不能等待 service export 之后再去获取.
Activity
yxc023 commentedon Mar 19, 2019
可能是个个性化需求, 我先手动 export 解决了.
kexianjun commentedon Mar 20, 2019
I'll try to reproduce this problem
kexianjun commentedon Mar 21, 2019
I have reproduce this issue
cvictory commentedon Mar 21, 2019
@mercyblitz can you have a look to this issue ?
mercyblitz commentedon Mar 21, 2019
This's an issue in 2.6.6
Polish /#3695 : @reference field can't refer its' @service Bean in sa…
Polish /apache#3695 : @reference field can't refer its' @service Bean…
Polish /#3695 : @reference field can't refer its' @service Bean in sa…
Fix NacosRegistry and Reference (#4485)
2.6.x (#4495)
fix default setting (#4955)