public class CloudFoundryVcapServicesPropertySourceLoader extends EnvJsonPropertySourceLoader
A PropertySourceLoader that reads from the environment variable VCAP_SERVICES
which is used by CloudFoundry.
| Modifier and Type | Field and Description |
|---|---|
static int |
POSITION
Position for the system property source loader in the chain.
|
FILE_EXTENSIONDEFAULT_POSITIONHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
CloudFoundryVcapServicesPropertySourceLoader() |
| Modifier and Type | Method and Description |
|---|---|
protected MapPropertySource |
createPropertySource(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> map,
int order) |
protected java.lang.String |
getEnvValue() |
java.util.Set<java.lang.String> |
getExtensions() |
int |
getOrder() |
protected void |
processInput(java.lang.String name,
java.io.InputStream input,
java.util.Map<java.lang.String,java.lang.Object> finalMap) |
protected java.util.Optional<java.io.InputStream> |
readInput(ResourceLoader resourceLoader,
java.lang.String fileName) |
getEnvValueAsStreamreadJsonAsMapload, loadEnv, processMap, readclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloadisEnabledreadpublic static final int POSITION
public CloudFoundryVcapServicesPropertySourceLoader()
public int getOrder()
getOrder in interface OrderedgetOrder in class EnvJsonPropertySourceLoaderprotected java.lang.String getEnvValue()
getEnvValue in class EnvJsonPropertySourceLoaderpublic java.util.Set<java.lang.String> getExtensions()
getExtensions in interface PropertySourceReadergetExtensions in class JsonPropertySourceLoaderprotected java.util.Optional<java.io.InputStream> readInput(ResourceLoader resourceLoader, java.lang.String fileName)
readInput in class EnvJsonPropertySourceLoaderresourceLoader - The resource loaderfileName - The file nameOptionalprotected void processInput(java.lang.String name,
java.io.InputStream input,
java.util.Map<java.lang.String,java.lang.Object> finalMap)
throws java.io.IOException
processInput in class JsonPropertySourceLoadername - The nameinput - The input streamfinalMap - The map with all the properties processedjava.io.IOException - If the input stream doesn't existprotected MapPropertySource createPropertySource(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> map, int order)
createPropertySource in class AbstractPropertySourceLoadername - The name of the property sourcemap - The maporder - The order of the property source