Package org.springframework.boot.env
Class SpringApplicationJsonEnvironmentPostProcessor
- java.lang.Object
- org.springframework.boot.env.SpringApplicationJsonEnvironmentPostProcessor
- All Implemented Interfaces:
EnvironmentPostProcessor
,org.springframework.core.Ordered
public class SpringApplicationJsonEnvironmentPostProcessor extends Object implements EnvironmentPostProcessor, org.springframework.core.Ordered
AnEnvironmentPostProcessor
that parses JSON fromspring.application.json
or equivalentlySPRING_APPLICATION_JSON
and adds it as a map property source to theEnvironment
. The new properties are added with higher priority than the system properties.- Since:
- 1.3.0
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_ORDER
The default order for the processor.static String
SPRING_APPLICATION_JSON_ENVIRONMENT_VARIABLE
Name of theSPRING_APPLICATION_JSON
environment variable.static String
SPRING_APPLICATION_JSON_PROPERTY
Name of thespring.application.json
property.
Constructor Summary
Constructors Constructor Description SpringApplicationJsonEnvironmentPostProcessor()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOrder()
void
postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, SpringApplication application)
Post-process the givenenvironment
.void
setOrder(int order)
Field Detail
SPRING_APPLICATION_JSON_PROPERTY
public static final String SPRING_APPLICATION_JSON_PROPERTY
Name of thespring.application.json
property.- See Also:
- Constant Field Values
SPRING_APPLICATION_JSON_ENVIRONMENT_VARIABLE
public static final String SPRING_APPLICATION_JSON_ENVIRONMENT_VARIABLE
Name of theSPRING_APPLICATION_JSON
environment variable.- See Also:
- Constant Field Values
DEFAULT_ORDER
public static final int DEFAULT_ORDER
The default order for the processor.- See Also:
- Constant Field Values
Constructor Detail
SpringApplicationJsonEnvironmentPostProcessor
public SpringApplicationJsonEnvironmentPostProcessor()
Method Detail
getOrder
public int getOrder()
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
setOrder
public void setOrder(int order)
postProcessEnvironment
public void postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, SpringApplication application)
Description copied from interface:EnvironmentPostProcessor
Post-process the givenenvironment
.- Specified by:
postProcessEnvironment
in interfaceEnvironmentPostProcessor
- Parameters:
environment
- the environment to post-processapplication
- the application to which the environment belongs