Package org.springframework.boot.context
Class ContextIdApplicationContextInitializer
java.lang.Object
org.springframework.boot.context.ContextIdApplicationContextInitializer
- All Implemented Interfaces:
ApplicationContextInitializer<ConfigurableApplicationContext>
,Ordered
public class ContextIdApplicationContextInitializer
extends Object
implements ApplicationContextInitializer<ConfigurableApplicationContext>, Ordered
ApplicationContextInitializer
that sets the Spring
ApplicationContext ID
. The
spring.application.name
property is used to create the ID. If the property is
not set application
is used.- Since:
- 1.0.0
- Author:
- Dave Syer, Andy Wilkinson
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getOrder()
void
initialize
(ConfigurableApplicationContext applicationContext) void
setOrder
(int order)
-
Constructor Details
-
ContextIdApplicationContextInitializer
public ContextIdApplicationContextInitializer()
-
-
Method Details
-
setOrder
public void setOrder(int order) -
getOrder
public int getOrder() -
initialize
- Specified by:
initialize
in interfaceApplicationContextInitializer<ConfigurableApplicationContext>
-