apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.51k stars 26.43k forks source link

Cannot get 'servicebean' from spring context after using 'redisson'. #9745

Closed lianjunwei closed 2 years ago

lianjunwei commented 2 years ago

Environment

Steps to reproduce this issue

  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. result is empty.
  3. if remove redisson, serviceBean work well.

Pls. provide [GitHub address] to reproduce this issue.

Expected Behavior

Actual Behavior

If there is an exception, please attach the exception trace:

Just put your stack trace here!

image

lianjunwei commented 2 years ago

Although I received "contextrefreshedevent" for the first time and didn't get "servicebean", the "contextrefreshedevent" received after the second time works normally. I close this issue.