Package io.micronaut.jackson.core.env
Class CloudFoundryVcapApplicationPropertySourceLoader
java.lang.Object
io.micronaut.context.env.AbstractPropertySourceLoader
io.micronaut.jackson.core.env.JsonPropertySourceLoader
io.micronaut.jackson.core.env.EnvJsonPropertySourceLoader
io.micronaut.jackson.core.env.CloudFoundryVcapApplicationPropertySourceLoader
- All Implemented Interfaces:
io.micronaut.context.env.PropertySourceLoader,io.micronaut.context.env.PropertySourceLocator,io.micronaut.context.env.PropertySourceReader,io.micronaut.core.order.Ordered,io.micronaut.core.util.Toggleable
@Internal
public class CloudFoundryVcapApplicationPropertySourceLoader
extends EnvJsonPropertySourceLoader
A PropertySourceLoader that reads from the environment variable VCAP_APPLICATION
which is used by CloudFoundry.
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intPosition for the system property source loader in the chain.Fields inherited from class io.micronaut.jackson.core.env.JsonPropertySourceLoader
FILE_EXTENSIONFields inherited from class io.micronaut.context.env.AbstractPropertySourceLoader
DEFAULT_POSITION, logFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected io.micronaut.context.env.MapPropertySourcecreatePropertySource(String name, Map<String, Object> map, int order) protected StringintgetOrder()protected voidprocessInput(String name, InputStream input, Map<String, Object> finalMap) protected Optional<InputStream>Methods inherited from class io.micronaut.jackson.core.env.EnvJsonPropertySourceLoader
getEnvValueAsStreamMethods inherited from class io.micronaut.jackson.core.env.JsonPropertySourceLoader
readJsonAsMapMethods inherited from class io.micronaut.context.env.AbstractPropertySourceLoader
isLogEnabled, load, loadEnv, processMap, read, setLogEnabledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.context.env.PropertySourceLoader
loadMethods inherited from interface io.micronaut.context.env.PropertySourceReader
readMethods inherited from interface io.micronaut.core.util.Toggleable
isEnabled
-
Field Details
-
POSITION
public static final int POSITIONPosition for the system property source loader in the chain.- See Also:
-
-
Constructor Details
-
CloudFoundryVcapApplicationPropertySourceLoader
public CloudFoundryVcapApplicationPropertySourceLoader() -
CloudFoundryVcapApplicationPropertySourceLoader
public CloudFoundryVcapApplicationPropertySourceLoader(boolean logEnabled)
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceio.micronaut.core.order.Ordered- Overrides:
getOrderin classEnvJsonPropertySourceLoader
-
getExtensions
- Specified by:
getExtensionsin interfaceio.micronaut.context.env.PropertySourceReader- Overrides:
getExtensionsin classJsonPropertySourceLoader
-
getEnvValue
- Overrides:
getEnvValuein classEnvJsonPropertySourceLoader- Returns:
- The JSON stored in the environment variables
SPRING_APPLICATION_JSONorMICRONAUT_APPLICATION_JSON.
-
readInput
protected Optional<InputStream> readInput(io.micronaut.core.io.ResourceLoader resourceLoader, String fileName) - Overrides:
readInputin classEnvJsonPropertySourceLoader
-
processInput
protected void processInput(String name, InputStream input, Map<String, Object> finalMap) throws IOException- Overrides:
processInputin classJsonPropertySourceLoader- Throws:
IOException
-
createPropertySource
protected io.micronaut.context.env.MapPropertySource createPropertySource(String name, Map<String, Object> map, int order) - Overrides:
createPropertySourcein classio.micronaut.context.env.AbstractPropertySourceLoader
-