grpc-ecosystem / grpc-spring

Spring Boot starter module for gRPC framework.
https://grpc-ecosystem.github.io/grpc-spring/
Apache License 2.0
3.48k stars 816 forks source link

Facing Dependency Error on Spring Boot 3 Update #810

Open adi-wtag opened 1 year ago

adi-wtag commented 1 year ago

The context

I am trying to update my project on Spring boot 3 that has a dependency on latest grpc starter module.

The question

I am facing a circular dependency error.

Sample Code

@Configuration
@GrpcClientBeans({
  @GrpcClientBean(clazz = CSBlockingStub.class, client = @GrpcClient("rc"))
})
class GrpcStubConfig {
  @Bean
  public CSBlockingStub csBlockingStub(CSBlockingStub stub) {
    return stub;
  }
}

The application's environment

Which versions do you use?

Additional information

It was working fine on spring boot 2.7.*

Error Message https://github.com/yidongnan/grpc-spring-boot-starter/issues/810#issuecomment-1359289765

ST-DDT commented 1 year ago

Please include the error message, so that I know which bean/dependency and where.

adi-wtag commented 1 year ago
The dependencies of some of the beans in the application context form a cycle:
┌─────┐
|  csBlockingStub defined in class path resource [../GrpcStubConfig.class]
└─────┘
adi-wtag commented 1 year ago

@ST-DDT If I use https://github.com/yidongnan/grpc-spring-boot-starter/commit/5853d23f984dfedd19a560ef18aa42eadd46fe44 latest commit instead of latest release, there is no such error. Could you please help me understanding the situation ? Will there be any new release asap ?

rahul-raj commented 1 year ago

@adi-wtag attach the complete error stack, not just the error message.