@Target(value=TYPE) @Retention(value=RUNTIME) @Documented @Inherited @Import(value=org.springframework.boot.autoconfigure.ImportAutoConfigurationImportSelector.class) public @interface ImportAutoConfiguration
@EnableAutoConfiguration
but restricts the auto-configuration classes
to the specified set, rather than consulting ImportCandidates
.
Can also be used to exclude()
specific auto-configuration classes such that
they will never be applied.
Generally, @EnableAutoConfiguration
should be used in preference to this
annotation, however, @ImportAutoConfiguration
can be useful in some situations
and especially when writing tests.
Modifier and Type | Optional Element and Description |
---|---|
Class<?>[] |
classes
The auto-configuration classes that should be imported.
|
Class<?>[] |
exclude
Exclude specific auto-configuration classes such that they will never be applied.
|
Class<?>[] |
value
The auto-configuration classes that should be imported.
|
@AliasFor(value="value") public abstract Class<?>[] classes
META-INF/spring
where the file name is the
fully-qualified name of the annotated class, suffixed with '.imports'.public abstract Class<?>[] exclude