Class ConfigurableApplicationContextInitializer

java.lang.Object
io.microsphere.spring.context.ConfigurableApplicationContextInitializer
All Implemented Interfaces:
org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
Direct Known Subclasses:
EventPublishingBeanInitializer, ListenableAutowireCandidateResolverInitializer, ListenableConfigurableEnvironmentInitializer

public abstract class ConfigurableApplicationContextInitializer extends Object implements org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
Abstract class of ApplicationContextInitializer for ConfigurableApplicationContext, which can be enabled or disabled by configuration properties.
Since:
1.0.0
Author:
Mercy
See Also:
  • ApplicationContextInitializer
  • ConfigurableApplicationContext
  • ConfigurableEnvironment
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final io.microsphere.logging.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    Get the default value of enabled
    protected String
    Get the property name of the enabled
    final void
    initialize(org.springframework.context.ConfigurableApplicationContext context)
     
    protected abstract void
    initialize(org.springframework.context.ConfigurableApplicationContext context, org.springframework.core.env.ConfigurableEnvironment environment)
    Initialize the ConfigurableApplicationContext.
    protected boolean
    isEnabled(org.springframework.context.ConfigurableApplicationContext context, org.springframework.core.env.ConfigurableEnvironment environment)
    Is enabled or not

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • logger

      protected final io.microsphere.logging.Logger logger
  • Constructor Details

    • ConfigurableApplicationContextInitializer

      public ConfigurableApplicationContextInitializer()
  • Method Details

    • initialize

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

      protected abstract void initialize(org.springframework.context.ConfigurableApplicationContext context, org.springframework.core.env.ConfigurableEnvironment environment)
      Initialize the ConfigurableApplicationContext.
      Parameters:
      context - the ConfigurableApplicationContext
      environment - the ConfigurableEnvironment
    • isEnabled

      protected boolean isEnabled(org.springframework.context.ConfigurableApplicationContext context, org.springframework.core.env.ConfigurableEnvironment environment)
      Is enabled or not
      Parameters:
      context - the ConfigurableApplicationContext
      environment - the ConfigurableEnvironment
      Returns:
      if enabled, return true, or false
    • getEnabledPropertyName

      protected String getEnabledPropertyName()
      Get the property name of the enabled
      Returns:
      the property name of the enabled
    • getDefaultEnabled

      protected boolean getDefaultEnabled()
      Get the default value of enabled
      Returns:
      the default value of enabled
      See Also: