Package com.foreach.across.boot
Class AcrossApplicationAutoConfiguration
java.lang.Object
com.foreach.across.boot.AcrossApplicationAutoConfiguration
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExcludedAutoConfigurations
(String... excludedConfigurationClasses) getAutoConfigurationOrder
(String className) boolean
notExcluded
(String className) requestAutoConfiguration
(String autoConfigurationClass) retrieve
(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, ClassLoader classLoader) Retrieve (or register) the single instance of the Across auto-configuration.
-
Constructor Details
-
AcrossApplicationAutoConfiguration
-
-
Method Details
-
addExcludedAutoConfigurations
-
requestAutoConfiguration
-
notExcluded
-
getModuleExtensions
-
getAutoConfigurationOrder
-
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 instanceclassLoader
- to use when creating- Returns:
- instance
-