|
41 | 41 | * {@link TomcatEmbeddedServletContainerFactory} (unless you have defined your own
|
42 | 42 | * {@link EmbeddedServletContainerFactory} bean).
|
43 | 43 | * <p>
|
| 44 | + * When using {@link SpringBootApplication}, the auto-configuration of the context is |
| 45 | + * automatically enabled and adding this annotation has therefore no additional effect. |
| 46 | + * <p> |
44 | 47 | * Auto-configuration tries to be as intelligent as possible and will back-away as you
|
45 | 48 | * define more of your own configuration. You can always manually {@link #exclude()} any
|
46 | 49 | * configuration that you never want to apply (use {@link #excludeName()} if you don't
|
47 | 50 | * have access to them). You can also exclude them via the
|
48 | 51 | * {@code spring.autoconfigure.exclude} property. Auto-configuration is always applied
|
49 | 52 | * after user-defined beans have been registered.
|
50 | 53 | * <p>
|
51 |
| - * The package of the class that is annotated with {@code @EnableAutoConfiguration} has |
52 |
| - * specific significance and is often used as a 'default'. For example, it will be used |
53 |
| - * when scanning for {@code @Entity} classes. It is generally recommended that you place |
54 |
| - * {@code @EnableAutoConfiguration} in a root package so that all sub-packages and classes |
55 |
| - * can be searched. |
| 54 | + * The package of the class that is annotated with {@code @EnableAutoConfiguration}, |
| 55 | + * usually via {@code @SpringBootApplication}, has specific significance and is often used |
| 56 | + * as a 'default'. For example, it will be used when scanning for {@code @Entity} classes. |
| 57 | + * It is generally recommended that you place {@code @EnableAutoConfiguration} (if you're |
| 58 | + * not using {@code @SpringBootApplication}) in a root package so that all sub-packages |
| 59 | + * and classes can be searched. |
56 | 60 | * <p>
|
57 | 61 | * Auto-configuration classes are regular Spring {@link Configuration} beans. They are
|
58 | 62 | * located using the {@link SpringFactoriesLoader} mechanism (keyed against this class).
|
|
66 | 70 | * @see ConditionalOnMissingBean
|
67 | 71 | * @see ConditionalOnClass
|
68 | 72 | * @see AutoConfigureAfter
|
| 73 | + * @see SpringBootApplication |
69 | 74 | */
|
70 | 75 | @SuppressWarnings("deprecation")
|
71 | 76 | @Target(ElementType.TYPE)
|
|
0 commit comments