Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrate @EnableCircuitBreaker and @EnableEurekaClient to Spring Cloud 2022.0.1

I upgraded Spring Cloud version to 2022.0.1 and I get error for imports not found:

import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;

Application class:

@EnableEurekaClient
@EnableCircuitBreaker

Do you know how I can properly import them or upgrade them?

like image 932
Peter Penzov Avatar asked Oct 28 '25 08:10

Peter Penzov


1 Answers

since Spring boot 2.5.12 @EnableCircuitBreaker is Deprecated, So you don't need to use it. Also, this happened to @EnableEurekaClient and there is no need to annotate it Just add these two dependencies to the project

spring-cloud-starter-circuitbreaker-resilience4j
org.springframework.cloud:spring-cloud-starter-netflix-eureka-client

like image 170
Soheil Babadi Avatar answered Oct 31 '25 01:10

Soheil Babadi