package org.springframework.cloud.netflix.feign;

import org.onetwo.cloud.feign.FeignProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 这个比较奇怪，必须放到spring.factories，@ConditionalOnProperty才起作用
 * @author wayshall
 * <br/>
 */
@Configuration
//@ConditionalOnProperty(value=FeignProperties.LOCAL_ENABLE_KEY, havingValue="true", matchIfMissing=false)
@EnableConfigurationProperties({FeignProperties.class})
public class LocalFeignTargeterConfiguration {

	@Bean
	public Targeter feignTargeter() {
		return new LocalTargeter();
	}
}

@@ -82,32 +82,108 @@
 eignProperties;%0A
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;%0A
 import org.sprin
@@ -635,16 +635,55 @@
 class%7D)%0A
+@ConditionalOnClass(feign.Feign.class)%0A
 public c

add condition load