Add reference to SpringBootApplication in EnableAutoConfiguration
Closes gh-9521
This commit is contained in:
@@ -41,6 +41,9 @@ import org.springframework.core.io.support.SpringFactoriesLoader;
|
||||
* {@link TomcatEmbeddedServletContainerFactory} (unless you have defined your own
|
||||
* {@link EmbeddedServletContainerFactory} bean).
|
||||
* <p>
|
||||
* When using {@link SpringBootApplication}, the auto-configuration of the context is
|
||||
* automatically enabled and adding this annotation has therefore no additional effect.
|
||||
* <p>
|
||||
* Auto-configuration tries to be as intelligent as possible and will back-away as you
|
||||
* define more of your own configuration. You can always manually {@link #exclude()} any
|
||||
* configuration that you never want to apply (use {@link #excludeName()} if you don't
|
||||
@@ -48,11 +51,12 @@ import org.springframework.core.io.support.SpringFactoriesLoader;
|
||||
* {@code spring.autoconfigure.exclude} property. Auto-configuration is always applied
|
||||
* after user-defined beans have been registered.
|
||||
* <p>
|
||||
* The package of the class that is annotated with {@code @EnableAutoConfiguration} has
|
||||
* specific significance and is often used as a 'default'. For example, it will be used
|
||||
* when scanning for {@code @Entity} classes. It is generally recommended that you place
|
||||
* {@code @EnableAutoConfiguration} in a root package so that all sub-packages and classes
|
||||
* can be searched.
|
||||
* The package of the class that is annotated with {@code @EnableAutoConfiguration},
|
||||
* usually via {@code @SpringBootApplication}, has specific significance and is often used
|
||||
* as a 'default'. For example, it will be used when scanning for {@code @Entity} classes.
|
||||
* It is generally recommended that you place {@code @EnableAutoConfiguration} (if you're
|
||||
* not using {@code @SpringBootApplication}) in a root package so that all sub-packages
|
||||
* and classes can be searched.
|
||||
* <p>
|
||||
* Auto-configuration classes are regular Spring {@link Configuration} beans. They are
|
||||
* located using the {@link SpringFactoriesLoader} mechanism (keyed against this class).
|
||||
@@ -66,6 +70,7 @@ import org.springframework.core.io.support.SpringFactoriesLoader;
|
||||
* @see ConditionalOnMissingBean
|
||||
* @see ConditionalOnClass
|
||||
* @see AutoConfigureAfter
|
||||
* @see SpringBootApplication
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Target(ElementType.TYPE)
|
||||
|
||||
Reference in New Issue
Block a user