
package org.springframework.cloud.openfeign;

import feign.hystrix.HystrixFeign;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/**
 *
 * <p>
 * HystrixFeignTargeter 配置
 */
@Configuration
@ConditionalOnClass(HystrixFeign.class)
@ConditionalOnProperty("feign.hystrix.enabled")
public class ScHystrixFeignTargeterConfiguration {

	@Bean
	@Primary
	public Targeter scFeignTargeter() {
		System.out.println("ScHystrixFeignTargeterConfiguration.scFeignTargeter()");
		return new ScHystrixTargeter();
	}
}
