类 ContextIdApplicationContextInitializer

  • 所有已实现的接口:
    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:
    • spring.application.name
    • vcap.application.name
    • spring.config.name
    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:

    • spring.application.index
    • vcap.application.instance_index
    • PORT
    • 方法详细资料

      • setOrder

        public void setOrder​(int order)
      • getOrder

        public int getOrder()
        指定者:
        getOrder 在接口中 org.springframework.core.Ordered
      • initialize

        public void initialize​(org.springframework.context.ConfigurableApplicationContext applicationContext)
        指定者:
        initialize 在接口中 org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>