grpc-spring icon indicating copy to clipboard operation
grpc-spring copied to clipboard

this dependency seems to be incompatible with new version 3.x of spring boot.

Open codeGuru775 opened this issue 1 year ago • 2 comments

The context

upgrade my app to spring boot 3.X

The bug

"grpc-spring-boot-starter" seems to not have a version compatible with spring boot 3.x as of now. And since their auto-configuration is still present in "spring.factories" file, some of the beans for these dependencies are not being autowired after migration to spring boot 3, resulting in application start up failures.

codeGuru775 avatar Feb 13 '24 18:02 codeGuru775

Could you please post the error mesaage along with the version you are using?

ST-DDT avatar Feb 14 '24 08:02 ST-DDT

I'm having a similar problem. I'm following the Getting Started Guide, but Spring Boot 3 seems to ignore @GrpcService. Probably there is some kind of auto-detecting issue described in 3rd task of Implementing the Service. And my pom.xml, downgrading spring-boot-starter-parent seemed to work for me. i.e. from:

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>3.2.2</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

to:

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.5.7</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

ocebenzer avatar Feb 17 '24 14:02 ocebenzer

You never said which version of grpc-spring you are using. Is it possibly not the latest?

dsyer avatar Mar 14 '24 10:03 dsyer

You never said which version of grpc-spring you are using. Is it possibly not the latest?

You were right, I was using 2.15.0 and 3.0.0 is released and Beans are autowired there. What a simple mistake, thank you!

ocebenzer avatar Mar 14 '24 11:03 ocebenzer