-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2024RC1: LoadBalancer with Eureka Discovery Client throws: Error creating bean with name 'scopedTarget.eurekaClient': Requested bean is currently in creation #4380
Comments
Hello @eiswind, thanks for creating the issue. Will take a look on Monday. |
It's actually not a bug exactly, but a consequence of switching to @SpringBootApplication
public class HelloApplication {
public static void main(String[] args) {
SpringApplication.run(HelloApplication.class, args);
}
@LoadBalanced // <1>
@Bean
RestClient.Builder lbRestClientBuilder() {
return RestClient.builder();
}
@Primary
@Bean
RestClient.Builder restClientBuilder() {
return RestClient.builder();
}
} @Controller
public class HelloController {
@Autowired
@LoadBalanced
RestClient.Builder restClientBuilder;
@GetMapping("/")
String home(Model model) {
var response = restClientBuilder.build()
.get()
.uri(URI.create("http://HELLO-SERVICE/sayhello")) // <1>
.retrieve()
.body(String.class);
model.addAttribute("response", response);
return "hello";
}
} or |
While this is not a bug, it's a possible backwards compatibility issue, so it might be worth considering making |
We've decided to revert the defaults and change things for the major. Also consider providing a more explicit way for the users to indicate a |
Tests are green with the release. Thanks for your support! |
Describe the bug
I have a very simple demo app running Config Server, Eureka, a Hello Service, and a Hello-App on localhost.
After updating to Spring Boot 3.4 and Cloud 2024RC1 the app throws at startup:
I have the following dependencies in my app:
Sample
I'll add a reproducing example.
cloud-teaser.zip
The text was updated successfully, but these errors were encountered: