Package org.openwms.tms.routing.app
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
Modifier and TypeFieldDescriptionstatic 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
ConstructorDescriptionConfigServerResourcePatternResolver
(org.springframework.web.client.RestTemplate restTemplate, String configServerId, String configServerProtocol, String configServerUsername, String configServerPassword) -
Method Summary
Modifier and TypeMethodDescriptionorg.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, doFindPathMatchingFileResources, doFindPathMatchingJarResources, findAllClassPathResources, findAllModulePathResources, findPathMatchingResources, getClassLoader, getJarFile, getPathMatcher, getResourceLoader, getResources, isJarResource, resolveRootDirResource, setPathMatcher
-
Field Details
-
CONFIG_URL_PREFIX
- See Also:
-
restTemplate
private org.springframework.web.client.RestTemplate restTemplate -
configServerId
-
configServerProtocol
-
configServerUsername
-
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
- Specified by:
getResource
in interfaceorg.springframework.core.io.ResourceLoader
- Overrides:
getResource
in classorg.springframework.core.io.support.PathMatchingResourcePatternResolver
-
resolveConfiguredValue
-