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 Classes Modifier and Type Class Description protected static classConsulConfigDataLocationResolver.ConsulConfigDataIndexes
-
Field Summary
Fields Modifier and Type Field Description protected static List<String>DIR_SUFFIXESprotected static List<String>FILES_SUFFIXESstatic StringPREFIXConsul ConfigData prefix.
-
Constructor Summary
Constructors Constructor Description ConsulConfigDataLocationResolver(org.apache.commons.logging.Log log)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.ecwid.consul.v1.ConsulClientcreateConsulClient(org.springframework.boot.BootstrapContext context)protected List<String>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)List<ConsulConfigDataResource>resolve(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location)List<ConsulConfigDataResource>resolveProfileSpecific(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext, org.springframework.boot.context.config.ConfigDataLocation location, org.springframework.boot.context.config.Profiles profiles)
-
-
-
Method Detail
-
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
protected List<String> getSuffixes(ConsulConfigProperties properties)
-
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)
-
-