@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 |
---|---|
java.lang.Class<?>[] |
classes
The auto-configuration classes that should be imported.
|
java.lang.Class<?>[] |
exclude
Exclude specific auto-configuration classes such that they will never be applied.
|
java.lang.Class<?>[] |
value
The auto-configuration classes that should be imported.
|
@AliasFor(value="classes") public abstract java.lang.Class<?>[] value
classes()
.@AliasFor(value="value") public abstract java.lang.Class<?>[] classes
META-INF/spring.factories
where the key is the
fully-qualified name of the annotated class.