You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/EnableAutoConfiguration.java
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -41,18 +41,22 @@
41
41
* {@link TomcatServletWebServerFactory} (unless you have defined your own
42
42
* {@link ServletWebServerFactory} 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).
0 commit comments