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 class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final List<String>
     
    protected static final List<String>
     
    static final String
    Consul ConfigData prefix.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConsulConfigDataLocationResolver(org.springframework.boot.logging.DeferredLogFactory logFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.ecwid.consul.v1.ConsulClient
    createConsulClient(org.springframework.boot.BootstrapContext context)
     
    protected List<String>
     
    boolean
    isResolvable(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location)
     
    loadConfigProperties(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext)
     
    loadProperties(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext, org.springframework.web.util.UriComponents location)
     
    protected org.springframework.web.util.UriComponents
    parseLocation(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location)
     
    protected <T> void
    registerAndPromoteBean(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, Class<T> type, org.springframework.boot.BootstrapRegistry.InstanceSupplier<T> supplier)
     
    protected <T> void
    registerBean(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, Class<T> type, org.springframework.boot.BootstrapRegistry.InstanceSupplier<T> supplier)
     
    <T> void
    registerBean(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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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:
      isResolvable in interface org.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:
      resolve in interface org.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:
      resolveProfileSpecific in interface org.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)