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
class ConfigServerResourcePatternResolver
extends org.springframework.core.io.support.PathMatchingResourcePatternResolver
A ConfigServerResourcePatternResolver.
- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate org.springframework.web.client.RestTemplateFields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIXFields inherited from interface org.springframework.core.io.support.ResourcePatternResolver
CLASSPATH_ALL_URL_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionConfigServerResourcePatternResolver(org.springframework.web.client.RestTemplate restTemplate, String configServerId, String configServerProtocol, String configServerUsername, String configServerPassword) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.core.io.ResourcegetResource(String location) private Optional<org.springframework.core.io.Resource> resolveConfiguredValue(String locationPattern) Methods inherited from class org.springframework.core.io.support.PathMatchingResourcePatternResolver
addAllClassLoaderJarRoots, addClassPathManifestEntries, clearCache, 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:
getResourcein interfaceorg.springframework.core.io.ResourceLoader- Overrides:
getResourcein classorg.springframework.core.io.support.PathMatchingResourcePatternResolver
-
resolveConfiguredValue
-