Closed jagc93 closed 9 months ago
I conducted some tests by modifying the versions of Spring Boot and Spring Cloud, and the latest version of Spring Cloud 2023.0.0 is compatible with Spring Boot version 3.2.0.
I'm not sure if there is a compatibility table or not, but Spring Boot version 3.2.1 still has conflicts with Spring Cloud version 2023.0.0.
Hello @jagc93. Thanks for reporting the issue. This repo is maintained in English. Since I can understand your entries, I'm not going to request you to rewrite everything, but I'm going to respond in English and request you to do so as well, so that everyone can understand the discussion.
To summarise, @jagc93 is reporting a regression illustrated by the enclosed stacktrace that appears with Spring Cloud 2023.0.0
and Boot 3.2.1
, while was not there with Spring Cloud 2023.0.0
and Spring Boot 3.2.0
.
@jagc93 I was not able to reproduce the issue. Here is a working sample with a similar setup. The README contains run instructions. If your issue still persists, verify if it also happens with Spring Boot 3.2.2
. If yes, please provide a minimal, complete, verifiable example that reproduces the issue, as a link to a GitHub repo with an executable app.
I am also facing the same problem. Here is the simple way to reproduce. I was using https://start.spring.io/ and I downloaded
@manishatGit please provide a minimal, complete, verifiable example that reproduces the issue, as a link to a GitHub repo with an executable app.
@OlgaMaciaszek I am providing a project below with the reproducible error, taking into account the versions of the issue: https://github.com/jagc93/eureka-discovery-client-failed
I also tried upgrading the Spring Boot version to 3.2.2, and the same issue occurs.
Hello @jagc93, @manishatGit, this is not a regression. If the provided sample is run with either Boot 3.2.1
, 3.2.0
, or 3.2.2
, it fails, and it also fails with Cloud 2022.0.4
and Boot 3.1.5
. This is because no HTTP client that the Eureka client could use under the hood is on the classpath. You need to provide one. You could use RestTemplate
by adding spring-boot-starter-web
or WebClient
by adding spring-boot-starter-webflux
or Jersey Client, by adding appropriate Jersey dependencies. I realise that this is not very well documented, so that's what we'll fix within this issue.
@OlgaMaciaszek It's curious because when I presented the issue, I already had several controllers implemented. From there, I thought there might be an issue in my code, and ultimately, I decided to create a micro from Spring Initializr and replicated the failure, even though I didn't implement any controllers in it.
I just tested by implementing the spring-boot-starter-web dependency, and it worked with any version. Thank you very much for the help, and well, at least it's now considered for future implementations.
@jagc93 , I was not able to reproduce this issue when a asupported HTTP client implementation was present in the classpath, which is typically the situation when you have controllers in your app, but there might be exceptions during a custom setup. I'd need to see a sample that reproduces the issue to be able to verify this.
@OlgaMaciaszek don't you think the jersey dependnecies are too old??
These dependencies last release seems to be 2017 and even jersey-client group id renamed to glassfish. Does these dependencies still working? or is there any latest jersey we need to use for this to work??
You can re-create this issue if you have jersey-client in the classpath and any of spring-boot-starter-web /web-flux in the classpath.
I am experiencing issues with the Eureka Client.
Spring Boot version
3.2.1
or3.2.2
. Spring cloud2023.0.0
java version 17 MavenI created from Spring Initializr again, 2 basic microservices to check whether the issue lies within my existing microservices or not, and the error persists.
The first one would be the discovery-server
pom.xml
In the DiscoveryServerApplication, I added the corresponding annotation.
And I left the .properties file as follows:
For the second microservice (Discovery client), which I named 'prueba', it would look like this:
Pom.xml
I tried in the class where the main method is (PruebaApplication), first in the default way it comes, and then by adding the annotation @EnableDiscoveryClient.
The .properties file would look like this:
The error I get is the following: