apache / shenyu

Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance.
https://shenyu.apache.org/
Apache License 2.0
8.44k stars 2.93k forks source link

[BUG] <Failed to register Dubbo protocol interface with Shenyu Admin in specific scenario> #3002

Closed lianjunwei closed 2 years ago

lianjunwei commented 2 years ago

Is there an existing issue for this?

Current Behavior

After using the third-party jar(redisson-spring-boot-starter),failed to register Dubbo protocol interface with Shenyu Admin.

Expected Behavior

After the backend micro service is started, the Dubbo interface is registered successfully.

Steps To Reproduce

  1. import redisson . eg:
       <dependency>
            <groupId>org.redisson</groupId>
            <artifactId>redisson-spring-boot-starter</artifactId>
            <version>3.16.8</version>
        </dependency>
  2. get 'servicebean' from spring context .

    Map<String, ServiceBean> serviceBean = contextRefreshedEvent.getApplicationContext().getBeansOfType(ServiceBean.class);
    3. serviceBean is empty,failed to register Dubbo protocol interface.
  3. if remove redisson, serviceBean work well, and the Dubbo interface is registered successfully.

Environment

ShenYu version(s):2.4.2 and  master

Debug logs

image

Anything else?

13801646720054_ pic

As shown in the figure, can fix the bug. I fix it.

lianjunwei commented 2 years ago

I will pr .

lianjunwei commented 2 years ago

fixed, and close it.