Deprecating @SpringCloudApplication and @EnableCircuitBreaker (#881)

This commit is contained in:
Ryan Baxter
2021-01-07 15:21:02 -05:00
committed by GitHub
parent a3486e2d93
commit 7744a7f6d2
2 changed files with 9 additions and 2 deletions

View File

@@ -24,19 +24,23 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
/**
* @author Spencer Gibb
* @deprecated This annotation has been deprecated as of the 3.0.1 release.
* <code>@EnableDiscoveryClient</code> is no longer needed, discovery client
* implementations are enabled as long as an implementation is on the classpath.
* <code>@EnableCircuitBreaker</code> is no longer used now that Hystrix has been removed
* from Spring Cloud.
*/
@Deprecated
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@SpringBootApplication
@EnableDiscoveryClient
@EnableCircuitBreaker
public @interface SpringCloudApplication {
}

View File

@@ -28,8 +28,11 @@ import org.springframework.context.annotation.Import;
/**
* Annotation to enable a CircuitBreaker implementation.
* https://martinfowler.com/bliki/CircuitBreaker.html
* @deprecated as of the 3.0.1 release. Hystrix has been removed from Spring Cloud Netflix
* and it was the only implementation using this annotation.
* @author Spencer Gibb
*/
@Deprecated
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented