Class SpringApplicationJsonEnvironmentPostProcessor
java.lang.Object
org.springframework.boot.support.SpringApplicationJsonEnvironmentPostProcessor
- All Implemented Interfaces:
EnvironmentPostProcessor, Ordered
public class SpringApplicationJsonEnvironmentPostProcessor
extends Object
implements EnvironmentPostProcessor, Ordered
An
EnvironmentPostProcessor that parses JSON from
spring.application.json or equivalently SPRING_APPLICATION_JSON and
adds it as a map property source to the Environment. The new properties are
added with higher priority than the system properties.- Since:
- 4.0.0
- Author:
- Dave Syer, Phillip Webb, Madhura Bhave, Artsiom Yudovin
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default order for the processor.static final StringName of theSPRING_APPLICATION_JSONenvironment variable.static final StringName of thespring.application.jsonproperty.Fields inherited from interface Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()voidpostProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) Post-process the givenenvironment.voidsetOrder(int order)
-
Field Details
-
SPRING_APPLICATION_JSON_PROPERTY
Name of thespring.application.jsonproperty.- See Also:
-
SPRING_APPLICATION_JSON_ENVIRONMENT_VARIABLE
Name of theSPRING_APPLICATION_JSONenvironment variable.- See Also:
-
DEFAULT_ORDER
public static final int DEFAULT_ORDERThe default order for the processor.- See Also:
-
-
Constructor Details
-
SpringApplicationJsonEnvironmentPostProcessor
public SpringApplicationJsonEnvironmentPostProcessor()
-
-
Method Details
-
getOrder
-
setOrder
public void setOrder(int order) -
postProcessEnvironment
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) Description copied from interface:EnvironmentPostProcessorPost-process the givenenvironment.- Specified by:
postProcessEnvironmentin interfaceEnvironmentPostProcessor- Parameters:
environment- the environment to post-processapplication- the application to which the environment belongs
-