Class FeignClientFactoryBean
java.lang.Object
org.springframework.cloud.openfeign.FeignClientFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.FactoryBean<Object>,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
public class FeignClientFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean<Object>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.BeanFactoryAware
- Author:
- Spencer Gibb, Venil Noronha, Eko Kurniawan Khannedy, Gregor Zurowski, Matt King, Olga Maciaszek-Sharma, Ilia Ilinykh, Marcin Grzejszczak, Jonatan Ivanov, Sam Kruglov, Jasbir Singh, Hyeonmin Park, Felix Dittrich
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCustomizer(FeignBuilderCustomizer customizer) voidprotected voidconfigureFeign(FeignContext context, feign.Feign.Builder builder) protected voidconfigureUsingConfiguration(FeignContext context, feign.Feign.Builder builder) protected voidconfigureUsingProperties(FeignClientProperties.FeignClientConfiguration config, feign.Feign.Builder builder) booleanprotected feign.Feign.Builderfeign(FeignContext context) protected <T> Tget(FeignContext context, Class<T> type) org.springframework.context.ApplicationContextClass<?>Class<?>getInheritedAwareInstances(FeignContext context, Class<T> type) protected <T> TgetInheritedAwareOptional(FeignContext context, Class<T> type) getName()Class<?>protected <T> TgetOptional(FeignContext context, Class<T> type) protected feign.Request.OptionsgetOptionsByName(FeignContext context, String contextId) Meant to get Options bean from context with bean name.getPath()Class<?>getType()getUrl()inthashCode()booleanbooleanbooleanprotected <T> TloadBalance(feign.Feign.Builder builder, FeignContext context, feign.Target.HardCodedTarget<T> target) voidsetApplicationContext(org.springframework.context.ApplicationContext context) voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) voidsetContextId(String contextId) voidsetDecode404(boolean decode404) voidsetFallback(Class<?> fallback) voidsetFallbackFactory(Class<?> fallbackFactory) voidsetInheritParentContext(boolean inheritParentContext) voidvoidvoidsetRefreshableClient(boolean refreshableClient) voidvoidtoString()
-
Constructor Details
-
FeignClientFactoryBean
public FeignClientFactoryBean()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
feign
-
configureFeign
-
configureUsingConfiguration
-
configureUsingProperties
protected void configureUsingProperties(FeignClientProperties.FeignClientConfiguration config, feign.Feign.Builder builder) -
get
-
getOptional
-
getInheritedAwareOptional
-
getInheritedAwareInstances
-
loadBalance
protected <T> T loadBalance(feign.Feign.Builder builder, FeignContext context, feign.Target.HardCodedTarget<T> target) -
getOptionsByName
Meant to get Options bean from context with bean name.- Parameters:
context- context of Feign clientcontextId- name of feign client- Returns:
- returns Options found in context
-
getObject
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<Object>
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<Object>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<Object>
-
getType
-
setType
-
getName
-
setName
-
getContextId
-
setContextId
-
getUrl
-
setUrl
-
getPath
-
setPath
-
isDecode404
public boolean isDecode404() -
setDecode404
public void setDecode404(boolean decode404) -
isInheritParentContext
public boolean isInheritParentContext() -
setInheritParentContext
public void setInheritParentContext(boolean inheritParentContext) -
addCustomizer
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext() -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getFallback
-
setFallback
-
getFallbackFactory
-
setFallbackFactory
-
setRefreshableClient
public void setRefreshableClient(boolean refreshableClient) -
equals
-
hashCode
public int hashCode() -
toString
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-