public class ContextIdApplicationContextInitializer extends Object implements ApplicationContextInitializer<ConfigurableApplicationContext>, Ordered
ApplicationContextInitializer
that set the Spring
ApplicationContext ID
. The following environment
properties will be consulted to create the ID:
In addition the following environment properties will be consulted to append a relevant port or index:
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
ContextIdApplicationContextInitializer() |
ContextIdApplicationContextInitializer(String name)
Create a new
ContextIdApplicationContextInitializer instance. |
Modifier and Type | Method and Description |
---|---|
int |
getOrder() |
void |
initialize(ConfigurableApplicationContext applicationContext) |
void |
setOrder(int order) |
public ContextIdApplicationContextInitializer()
public ContextIdApplicationContextInitializer(String name)
ContextIdApplicationContextInitializer
instance.name
- the name of the application (can include placeholders)public void setOrder(int order)
public void initialize(ConfigurableApplicationContext applicationContext)
initialize
in interface ApplicationContextInitializer<ConfigurableApplicationContext>
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.