Remove @EnableCircuitBreaker annotation
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.client.circuitbreaker;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
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
|
||||
@Inherited
|
||||
@Import(EnableCircuitBreakerImportSelector.class)
|
||||
public @interface EnableCircuitBreaker {
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.client.circuitbreaker;
|
||||
|
||||
import org.springframework.cloud.commons.util.SpringFactoryImportSelector;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
|
||||
/**
|
||||
* Imports a single circuit breaker implementation configuration.
|
||||
*
|
||||
* @author Spencer Gibb
|
||||
*/
|
||||
@Order(Ordered.LOWEST_PRECEDENCE - 100)
|
||||
public class EnableCircuitBreakerImportSelector extends SpringFactoryImportSelector<EnableCircuitBreaker> {
|
||||
|
||||
@Override
|
||||
protected boolean isEnabled() {
|
||||
return getEnvironment().getProperty("spring.cloud.circuit.breaker.enabled", Boolean.class, Boolean.TRUE);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -71,7 +71,6 @@ public abstract class AbstractAutoServiceRegistration<R extends Registration>
|
||||
|
||||
private List<RegistrationLifecycle<R>> registrationLifecycles = new ArrayList<>();
|
||||
|
||||
|
||||
protected AbstractAutoServiceRegistration(ServiceRegistry<R> serviceRegistry,
|
||||
AutoServiceRegistrationProperties properties) {
|
||||
this.serviceRegistry = serviceRegistry;
|
||||
|
||||
Reference in New Issue
Block a user