Class ConsulConfigDataLocationResolver
java.lang.Object
org.springframework.cloud.consul.config.ConsulConfigDataLocationResolver
- All Implemented Interfaces:
org.springframework.boot.context.config.ConfigDataLocationResolver<ConsulConfigDataResource>
public class ConsulConfigDataLocationResolver
extends Object
implements org.springframework.boot.context.config.ConfigDataLocationResolver<ConsulConfigDataResource>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConsulConfigDataLocationResolver(org.springframework.boot.logging.DeferredLogFactory logFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.ecwid.consul.v1.ConsulClientcreateConsulClient(org.springframework.boot.BootstrapContext context) getSuffixes(ConsulConfigProperties properties) booleanisResolvable(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) protected ConsulConfigPropertiesloadConfigProperties(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext) protected ConsulPropertiesloadProperties(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext, org.springframework.web.util.UriComponents location) protected org.springframework.web.util.UriComponentsparseLocation(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) protected <T> voidregisterAndPromoteBean(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, Class<T> type, org.springframework.boot.BootstrapRegistry.InstanceSupplier<T> supplier) protected <T> voidregisterBean(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, Class<T> type, org.springframework.boot.BootstrapRegistry.InstanceSupplier<T> supplier) <T> voidregisterBean(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, Class<T> type, T instance) resolve(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) resolveProfileSpecific(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext, org.springframework.boot.context.config.ConfigDataLocation location, org.springframework.boot.context.config.Profiles profiles)
-
Field Details
-
PREFIX
Consul ConfigData prefix.- See Also:
-
DIR_SUFFIXES
-
FILES_SUFFIXES
-
-
Constructor Details
-
ConsulConfigDataLocationResolver
public ConsulConfigDataLocationResolver(org.springframework.boot.logging.DeferredLogFactory logFactory)
-
-
Method Details
-
isResolvable
public boolean isResolvable(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) - Specified by:
isResolvablein interfaceorg.springframework.boot.context.config.ConfigDataLocationResolver<ConsulConfigDataResource>
-
resolve
public List<ConsulConfigDataResource> resolve(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) throws org.springframework.boot.context.config.ConfigDataLocationNotFoundException - Specified by:
resolvein interfaceorg.springframework.boot.context.config.ConfigDataLocationResolver<ConsulConfigDataResource>- Throws:
org.springframework.boot.context.config.ConfigDataLocationNotFoundException
-
resolveProfileSpecific
public List<ConsulConfigDataResource> resolveProfileSpecific(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext, org.springframework.boot.context.config.ConfigDataLocation location, org.springframework.boot.context.config.Profiles profiles) throws org.springframework.boot.context.config.ConfigDataLocationNotFoundException - Specified by:
resolveProfileSpecificin interfaceorg.springframework.boot.context.config.ConfigDataLocationResolver<ConsulConfigDataResource>- Throws:
org.springframework.boot.context.config.ConfigDataLocationNotFoundException
-
getSuffixes
-
parseLocation
@Nullable protected org.springframework.web.util.UriComponents parseLocation(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) -
registerAndPromoteBean
protected <T> void registerAndPromoteBean(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, Class<T> type, org.springframework.boot.BootstrapRegistry.InstanceSupplier<T> supplier) -
registerBean
public <T> void registerBean(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, Class<T> type, T instance) -
registerBean
protected <T> void registerBean(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, Class<T> type, org.springframework.boot.BootstrapRegistry.InstanceSupplier<T> supplier) -
createConsulClient
protected com.ecwid.consul.v1.ConsulClient createConsulClient(org.springframework.boot.BootstrapContext context) -
loadProperties
protected ConsulProperties loadProperties(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext, org.springframework.web.util.UriComponents location) -
loadConfigProperties
protected ConsulConfigProperties loadConfigProperties(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext)
-