Package com.foreach.across.config
Annotation Interface AcrossApplication
@Retention(RUNTIME)
@Target(TYPE)
@Documented
@EnableAcrossContext
@AutoConfigurationPackage(basePackages="should.only.match.application.package")
@SpringBootConfiguration
@EnableAutoConfiguration
@Import({ApplicationModuleImportSelector.class,AcrossAutoConfigurationImportSelector.class,ExtendModuleAutoConfiguration.class,com.foreach.across.config.ApplicationAutoConfigurationPackage.class,com.foreach.across.config.ApplicationModuleAutoConfigurationPackage.class,IllegalConfigurationValidator.class})
public @interface AcrossApplication
Annotation that merges
EnableAcrossContext
together with Spring Boot configuration classes
for web applications. Supports most attributes that EnableAcrossContext
does, but allows
for minimal configuration of an application. Optionally adds support for dynamic modules based on the
enableDynamicModules()
value.
NOTE: Even though this class defines EnableAutoConfiguration
, it will explicitly disable auto configuration
in the ApplicationModuleImportSelector
. The annotation is added for better IDE support.
Actual auto-configuration is done by the AcrossAutoConfigurationImportSelector
.- Author:
- Arne Vandamme
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
If enabled, Spring Boot auto-configuration will be attempted.Display name that should be used for the context.boolean
If enabled, this will register aAcrossDynamicModulesConfiguration
and will scan for dynamic modules based on the package of the importing class.Class<?>[]
Array of AutoConfiguration classes that should not be enabled.String[]
Array ofAcrossModule
names that should never be resolved through scanning, no matter the values ofscanForRequiredModules()
andscanForOptionalModules()
.Class<?>[]
Type-safe alternative tomoduleConfigurationPackages()
for specifying the packages to scan forModuleConfiguration
classes.String[]
Set of packages that should be scanned forModuleConfiguration
classes.Class<?>[]
Type-safe alternative tomodulePackages()
for specifying the packages to scan for modules.String[]
Set of packages that should be scanned for modules.String[]
Array ofAcrossModule
names that should be configured if auto configuration is enabled.boolean
If auto configuration is enabled, should optional modules be scanned for?boolean
If auto configuration is enabled, should required modules be scanned for?
-
Element Details
-
displayName
String displayNameDisplay name that should be used for the context. If empty, the property value of across.displayName will be used instead. If no property value is specified, the simple class name of the class that holds the annotation will be used.- Default:
- ""
-
enableDynamicModules
boolean enableDynamicModulesIf enabled, this will register aAcrossDynamicModulesConfiguration
and will scan for dynamic modules based on the package of the importing class.- Default:
- true
-
autoConfiguration
boolean autoConfigurationIf enabled, Spring Boot auto-configuration will be attempted.- Default:
- true
-
modules
String[] modulesArray ofAcrossModule
names that should be configured if auto configuration is enabled. These will be added to theAcrossContext
before any configured module beans and before theAcrossContextConfigurer
instances are called.- Default:
- {}
-
excludeFromScanning
String[] excludeFromScanningArray ofAcrossModule
names that should never be resolved through scanning, no matter the values ofscanForRequiredModules()
andscanForOptionalModules()
.- Default:
- {}
-
scanForRequiredModules
boolean scanForRequiredModulesIf auto configuration is enabled, should required modules be scanned for? All modules configured using themodules()
attribute are considered to be required.- Default:
- true
-
scanForOptionalModules
boolean scanForOptionalModulesIf auto configuration is enabled, should optional modules be scanned for?- Default:
- false
-
modulePackages
String[] modulePackagesSet of packages that should be scanned for modules. The standard modules packages as well as the package of the importing class will be used as well. If you do not want this, you should add . (dot) as a package name. In that case only explicitly defined module packages will be used.- Default:
- {}
-
modulePackageClasses
Class<?>[] modulePackageClassesType-safe alternative tomodulePackages()
for specifying the packages to scan for modules. The package of each class specified will be scanned.Consider creating a special no-op marker class or interface in each package that serves no purpose other than being referenced by this attribute.
The default packages will always apply as well, if you do not want this you should define . (dot) in
.modulePackages()
- Default:
- {}
-
moduleConfigurationPackages
String[] moduleConfigurationPackagesSet of packages that should be scanned forModuleConfiguration
classes. If empty the sub-packages config and extensions of the importing class will be used.- Default:
- {}
-
moduleConfigurationPackageClasses
Class<?>[] moduleConfigurationPackageClassesType-safe alternative tomoduleConfigurationPackages()
for specifying the packages to scan forModuleConfiguration
classes. The package of each class specified will be scanned.Consider creating a special no-op marker class or interface in each package that serves no purpose other than being referenced by this attribute.
- Default:
- {}
-
excludeAutoConfigurations
Class<?>[] excludeAutoConfigurationsArray of AutoConfiguration classes that should not be enabled. The provided classes will be excluded in addition to the exclusions defined in the META-INF/across.configuration file.- See Also:
- Default:
- {}
-