Class AcrossApplicationAutoConfiguration

java.lang.Object
com.foreach.across.boot.AcrossApplicationAutoConfiguration

public final class AcrossApplicationAutoConfiguration extends Object
Tracks requested auto-configuration classes and determines which action should be taken: - allow the auto-configuration class (on the application level) - inject the auto-configuration class in another module instead - inject another configuration class instead of the one requested - simply reject it

Checks the across.configuration file for the auto-configuration class rules: - com.foreach.across.AutoConfigurationDisabled contains the classes to reject - com.foreach.across.AutoConfigurationEnabled contains the classes allowed and their corresponding actions

Possible entries for AutoConfigurationEnabled: - A will allow class A on the application level - A:B will add class B on the application level when A is requested - A->ModuleName will inject class A in module ModuleName, when A is requested

Note: once a class has been excluded using AutoConfigurationDisabled, it will never be added automatically, even if there are AutoConfigurationEnabled rules.

Since:
3.0.0
Author:
Arne Vandamme
  • Constructor Details

    • AcrossApplicationAutoConfiguration

      public AcrossApplicationAutoConfiguration(ClassLoader classLoader)
  • Method Details

    • addExcludedAutoConfigurations

      public void addExcludedAutoConfigurations(String... excludedConfigurationClasses)
    • requestAutoConfiguration

      public String requestAutoConfiguration(String autoConfigurationClass)
    • notExcluded

      public boolean notExcluded(String className)
    • getModuleExtensions

      public Map<String,List<String>> getModuleExtensions()
    • getAutoConfigurationOrder

      public Integer getAutoConfigurationOrder(String className)
    • retrieve

      public static AcrossApplicationAutoConfiguration retrieve(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, ClassLoader classLoader)
      Retrieve (or register) the single instance of the Across auto-configuration.
      Parameters:
      beanFactory - to request for the instance
      classLoader - to use when creating
      Returns:
      instance