@Internal public class CloudFoundryVcapApplicationPropertySourceLoader extends EnvJsonPropertySourceLoader
A PropertySourceLoader
that reads from the environment variable VCAP_APPLICATION
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_EXTENSION
DEFAULT_POSITION, log
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
CloudFoundryVcapApplicationPropertySourceLoader() |
CloudFoundryVcapApplicationPropertySourceLoader(boolean logEnabled) |
Modifier and Type | Method and Description |
---|---|
protected MapPropertySource |
createPropertySource(String name,
Map<String,Object> map,
int order) |
protected String |
getEnvValue() |
Set<String> |
getExtensions() |
int |
getOrder() |
protected void |
processInput(String name,
InputStream input,
Map<String,Object> finalMap) |
protected Optional<InputStream> |
readInput(ResourceLoader resourceLoader,
String fileName) |
getEnvValueAsStream
readJsonAsMap
isLogEnabled, load, loadEnv, processMap, read, setLogEnabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
load
isEnabled
read
public static final int POSITION
public CloudFoundryVcapApplicationPropertySourceLoader()
public CloudFoundryVcapApplicationPropertySourceLoader(boolean logEnabled)
public int getOrder()
getOrder
in interface Ordered
getOrder
in class EnvJsonPropertySourceLoader
public Set<String> getExtensions()
getExtensions
in interface PropertySourceReader
getExtensions
in class JsonPropertySourceLoader
protected String getEnvValue()
getEnvValue
in class EnvJsonPropertySourceLoader
SPRING_APPLICATION_JSON
or MICRONAUT_APPLICATION_JSON
.protected Optional<InputStream> readInput(ResourceLoader resourceLoader, String fileName)
readInput
in class EnvJsonPropertySourceLoader
resourceLoader
- The resource loaderfileName
- The file nameOptional
protected void processInput(String name, InputStream input, Map<String,Object> finalMap) throws IOException
processInput
in class JsonPropertySourceLoader
name
- The nameinput
- The input streamfinalMap
- The map with all the properties processedIOException
- If the input stream doesn't existprotected MapPropertySource createPropertySource(String name, Map<String,Object> map, int order)
createPropertySource
in class AbstractPropertySourceLoader
name
- The name of the property sourcemap
- The maporder
- The order of the property source