@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 spring.factories
.
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.factories
where the key is the
fully-qualified name of the annotated class.public abstract Class<?>[] exclude
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.