Package org.springframework.boot.context
Class ContextIdApplicationContextInitializer
- java.lang.Object
- org.springframework.boot.context.ContextIdApplicationContextInitializer
- All Implemented Interfaces:
org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
,org.springframework.core.Ordered
public class ContextIdApplicationContextInitializer extends Object implements org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>, org.springframework.core.Ordered
ApplicationContextInitializer
that sets the SpringApplicationContext ID
. Thespring.application.name
property is used to create the ID. If the property is not setapplication
is used.
Constructor Summary
Constructors Constructor Description ContextIdApplicationContextInitializer()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOrder()
void
initialize(org.springframework.context.ConfigurableApplicationContext applicationContext)
void
setOrder(int order)
Constructor Detail
ContextIdApplicationContextInitializer
public ContextIdApplicationContextInitializer()
Method Detail
setOrder
public void setOrder(int order)
getOrder
public int getOrder()
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
initialize
public void initialize(org.springframework.context.ConfigurableApplicationContext applicationContext)
- Specified by:
initialize
in interfaceorg.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>