You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "dengWuuu (via GitHub)" <gi...@apache.org> on 2023/03/18 03:10:05 UTC

[GitHub] [dubbo] dengWuuu commented on issue #11766: dubbo 中 yaml xml 注解 配置失效的地方

dengWuuu commented on issue #11766:
URL: https://github.com/apache/dubbo/issues/11766#issuecomment-1474651196

   > 似乎在使用注解时,main包下的@DubboReference会覆盖test包下的@DubboReference的配置属性
   > 
   > 可以通过测试:
   > 
   > ```java
   > //main包下
   > @Component
   > public class Task implements CommandLineRunner {
   > 
   >     @DubboReference(version = "*", loadbalance = "roundrobin", client = "myNetty")
   >     private VersionService versionService;
   >     //...
   > ```
   > 
   > ```java
   > //test包下
   > @RunWith(SpringRunner.class)
   > @SpringBootTest
   > public class VersionServiceStarIT {
   > 
   >     @DubboReference
   >     private VersionService service;
   > ```
   > 
   > MyNettyTransporter.getConnectedCount() == 2
   > 
   > 不能通过测试:
   > 
   > ```java
   > //main包下
   > @Component
   > public class Task implements CommandLineRunner {
   > 
   >     @DubboReference(version = "*")
   >     private VersionService versionService;
   >     //...
   > ```
   > 
   > ```java
   > //test包下
   > @RunWith(SpringRunner.class)
   > @SpringBootTest
   > public class VersionServiceStarIT {
   > 
   >     @DubboReference(version = "*", loadbalance = "roundrobin", client = "myNetty")
   >     private VersionService service;
   >     //...
   > ```
   > 
   > MyNettyTransporter.getConnectedCount() == 0
   > 
   > 我不清楚这是否算是bug。
   
   那看起来似乎并不是一个bug


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org