org.springframework.boot.context.initializer
Class ContextIdApplicationContextInitializer

java.lang.Object
  extended by org.springframework.boot.context.initializer.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 set the Spring ApplicationContext ID. The following environment properties will be consulted to create the ID:

If no property is set the ID 'application' will be used.

In addition the following environment properties will be consulted to append a relevant port or index:

Author:
Dave Syer

Field Summary
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
ContextIdApplicationContextInitializer()
           
 
Method Summary
 int getOrder()
           
 void initialize(org.springframework.context.ConfigurableApplicationContext applicationContext)
           
 void setOrder(int order)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextIdApplicationContextInitializer

public ContextIdApplicationContextInitializer()
Method Detail

setOrder

public void setOrder(int order)

getOrder

public int getOrder()
Specified by:
getOrder in interface org.springframework.core.Ordered

initialize

public void initialize(org.springframework.context.ConfigurableApplicationContext applicationContext)
Specified by:
initialize in interface org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>


Copyright © 2013. All Rights Reserved.