Package org.springframework.boot.env
Class EnvironmentPostProcessorApplicationListener
java.lang.Object
org.springframework.boot.env.EnvironmentPostProcessorApplicationListener
- All Implemented Interfaces:
EventListener,org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>,org.springframework.context.event.SmartApplicationListener,org.springframework.core.Ordered
public class EnvironmentPostProcessorApplicationListener
extends Object
implements org.springframework.context.event.SmartApplicationListener, org.springframework.core.Ordered
SmartApplicationListener used to trigger EnvironmentPostProcessors registered in the spring.factories file.- Since:
- 2.4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default order for the processor.Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionCreate a newEnvironmentPostProcessorApplicationListenerwithEnvironmentPostProcessorclasses loaded throughspring.factories. -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()voidonApplicationEvent(org.springframework.context.ApplicationEvent event) voidsetOrder(int order) booleansupportsEventType(Class<? extends org.springframework.context.ApplicationEvent> eventType) with(EnvironmentPostProcessorsFactory postProcessorsFactory) Factory method that creates anEnvironmentPostProcessorApplicationListenerwith a specificEnvironmentPostProcessorsFactory.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecutionMethods inherited from interface org.springframework.context.event.SmartApplicationListener
getListenerId, supportsSourceType
-
Field Details
-
DEFAULT_ORDER
public static final int DEFAULT_ORDERThe default order for the processor.- See Also:
-
-
Constructor Details
-
EnvironmentPostProcessorApplicationListener
public EnvironmentPostProcessorApplicationListener()Create a newEnvironmentPostProcessorApplicationListenerwithEnvironmentPostProcessorclasses loaded throughspring.factories.
-
-
Method Details
-
with
public static EnvironmentPostProcessorApplicationListener with(EnvironmentPostProcessorsFactory postProcessorsFactory) Factory method that creates anEnvironmentPostProcessorApplicationListenerwith a specificEnvironmentPostProcessorsFactory.- Parameters:
postProcessorsFactory- the environment post processor factory- Returns:
- an
EnvironmentPostProcessorApplicationListenerinstance
-
supportsEventType
public boolean supportsEventType(Class<? extends org.springframework.context.ApplicationEvent> eventType) - Specified by:
supportsEventTypein interfaceorg.springframework.context.event.SmartApplicationListener
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Specified by:
getOrderin interfaceorg.springframework.context.event.SmartApplicationListener
-
setOrder
public void setOrder(int order)
-