dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

应用使用spring标记,和二方包中手动new ApplicationConfig两者共存是出错

Open CodeIngL opened this issue 6 years ago • 4 comments

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.
  • [ ] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.4.1
  • Operating System version: macOS
  • Java version: 1.8

Steps to reproduce this issue

  1. 构建spring标签

image

  1. 构建另一个类暴露提供者或者消费者 image

  2. 结果出错 image

原因是该类在setApplication进行校验 image

应用场景下,应用有自身application作为dubbo apllicaion,但是我们内部会让应用引用相关统计包,统计包则是使用自身的application来构建dubbo接口进行上传数据,这种场景应该比较场景,能否进行说明 @ulinkwo @justinmclean

CodeIngL avatar Jan 14 '20 09:01 CodeIngL

ApplicationConfig instance must be single in the whole Dubbo application.

mercyblitz avatar Jan 16 '20 06:01 mercyblitz

这依旧有问题,一个充当中间件作用的jar包,使用dubbo进行传输,内部中使用api去掉了Application的设置,通过ConifgManager获取,但这存在问题,我们无法保证标签生成的ApplicationName和该jar包中api代码的初始化的顺序(将默认生成一个ApplicationConfig)。 @mercyblitz me

CodeIngL avatar Jan 17 '20 09:01 CodeIngL

@mercyblitz

CodeIngL avatar Jan 17 '20 09:01 CodeIngL

@mercyblitz

CodeIngL avatar Jan 17 '20 09:01 CodeIngL