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