Class ConsulConfigDataLocationResolver

  • All Implemented Interfaces:
    org.springframework.boot.context.config.ConfigDataLocationResolver<ConsulConfigDataResource>

    public class ConsulConfigDataLocationResolver
    extends Object
    implements org.springframework.boot.context.config.ConfigDataLocationResolver<ConsulConfigDataResource>
    • Constructor Detail

      • ConsulConfigDataLocationResolver

        public ConsulConfigDataLocationResolver​(org.apache.commons.logging.Log log)
    • Method Detail

      • 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
      • 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)