namelessssssssssss commented on issue #11766:
URL: https://github.com/apache/dubbo/issues/11766#issuecomment-1472093040
似乎在使用注解时,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。
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]