Package org.springframework.boot.env
Class EnvironmentPostProcessorApplicationListener
java.lang.Object
org.springframework.boot.env.EnvironmentPostProcessorApplicationListener
- All Implemented Interfaces:
EventListener
,ApplicationListener<ApplicationEvent>
,SmartApplicationListener
,Ordered
public class EnvironmentPostProcessorApplicationListener
extends Object
implements SmartApplicationListener, Ordered
SmartApplicationListener
used to trigger EnvironmentPostProcessors
registered in the spring.factories
file.- Since:
- 2.4.0
- Author:
- Phillip Webb
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The default order for the processor.Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a newEnvironmentPostProcessorApplicationListener
withEnvironmentPostProcessor
classes loaded viaspring.factories
. -
Method Summary
Modifier and TypeMethodDescriptionint
getOrder()
void
void
setOrder
(int order) boolean
supportsEventType
(Class<? extends ApplicationEvent> eventType) with
(EnvironmentPostProcessorsFactory postProcessorsFactory) Factory method that creates anEnvironmentPostProcessorApplicationListener
with a specificEnvironmentPostProcessorsFactory
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 newEnvironmentPostProcessorApplicationListener
withEnvironmentPostProcessor
classes loaded viaspring.factories
.
-
-
Method Details
-
with
public static EnvironmentPostProcessorApplicationListener with(EnvironmentPostProcessorsFactory postProcessorsFactory) Factory method that creates anEnvironmentPostProcessorApplicationListener
with a specificEnvironmentPostProcessorsFactory
.- Parameters:
postProcessorsFactory
- the environment post processor factory- Returns:
- an
EnvironmentPostProcessorApplicationListener
instance
-
supportsEventType
- Specified by:
supportsEventType
in interfaceSmartApplicationListener
-
onApplicationEvent
- Specified by:
onApplicationEvent
in interfaceApplicationListener<ApplicationEvent>
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceOrdered
- Specified by:
getOrder
in interfaceSmartApplicationListener
-
setOrder
public void setOrder(int order)
-