Class ConfigServerResourcePatternResolver

java.lang.Object
org.springframework.core.io.support.PathMatchingResourcePatternResolver
org.openwms.tms.routing.app.ConfigServerResourcePatternResolver
All Implemented Interfaces:
org.springframework.core.io.ResourceLoader, org.springframework.core.io.support.ResourcePatternResolver

@Primary @Component public class ConfigServerResourcePatternResolver extends org.springframework.core.io.support.PathMatchingResourcePatternResolver
A ConfigServerResourcePatternResolver.
Author:
Heiko Scherrer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    private String
     
    private String
     
    private String
     
    private String
     
    private org.springframework.web.client.RestTemplate
     

    Fields inherited from interface org.springframework.core.io.ResourceLoader

    CLASSPATH_URL_PREFIX

    Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver

    CLASSPATH_ALL_URL_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    ConfigServerResourcePatternResolver(org.springframework.web.client.RestTemplate restTemplate, String configServerId, String configServerProtocol, String configServerUsername, String configServerPassword)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.core.io.Resource
    getResource(String location)
     
    private Optional<org.springframework.core.io.Resource>
    resolveConfiguredValue(String locationPattern)
     

    Methods inherited from class org.springframework.core.io.support.PathMatchingResourcePatternResolver

    addAllClassLoaderJarRoots, addClassPathManifestEntries, convertClassLoaderURL, determineRootDir, doFindAllClassPathResources, doFindMatchingFileSystemResources, doFindPathMatchingFileResources, doFindPathMatchingJarResources, doRetrieveMatchingFiles, findAllClassPathResources, findPathMatchingResources, getClassLoader, getJarFile, getPathMatcher, getResourceLoader, getResources, isJarResource, listDirectory, resolveRootDirResource, retrieveMatchingFiles, setPathMatcher

    Methods inherited from class java.lang.Object

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

    • CONFIG_URL_PREFIX

      public static final String CONFIG_URL_PREFIX
      See Also:
    • restTemplate

      private org.springframework.web.client.RestTemplate restTemplate
    • configServerId

      private String configServerId
    • configServerProtocol

      private String configServerProtocol
    • configServerUsername

      private String configServerUsername
    • configServerPassword

      private String configServerPassword
  • Constructor Details

    • ConfigServerResourcePatternResolver

      ConfigServerResourcePatternResolver()
    • ConfigServerResourcePatternResolver

      public ConfigServerResourcePatternResolver(@Qualifier("aLoadBalanced") org.springframework.web.client.RestTemplate restTemplate, @Value("${spring.cloud.config.discovery.service-id}") String configServerId, @Value("${spring.cloud.config.headers.protocol:http}") String configServerProtocol, @Value("${spring.cloud.config.username}") String configServerUsername, @Value("${spring.cloud.config.password}") String configServerPassword)
  • Method Details

    • getResource

      public org.springframework.core.io.Resource getResource(String location)
      Specified by:
      getResource in interface org.springframework.core.io.ResourceLoader
      Overrides:
      getResource in class org.springframework.core.io.support.PathMatchingResourcePatternResolver
    • resolveConfiguredValue

      private Optional<org.springframework.core.io.Resource> resolveConfiguredValue(String locationPattern)