Annotation Interface EnableAutoConfiguration
tomcat-embedded.jaron your classpath you are likely to want a
TomcatServletWebServerFactory(unless you have defined your own
@SpringBootApplication, the auto-configuration
of the context is automatically enabled and adding this annotation has therefore no
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
configuration that you never want to apply (use
excludeName() if you don't
have access to them). You can also exclude them through the
spring.autoconfigure.exclude property. Auto-configuration is always applied
after user-defined beans have been registered.
The package of the class that is annotated with
@SpringBootApplication, has specific significance and is often
used as a 'default'. For example, it will be used when scanning for
classes. It is generally recommended that you place
(if you're not using
@SpringBootApplication) in a root package so that all
sub-packages and classes can be searched.
Auto-configuration classes are regular Spring
beans. They are located using
ImportCandidates. Generally auto-configuration
@Conditional beans (most often using
Optional Element Summary
excludeClass<?> excludeExclude specific auto-configuration classes such that they will never be applied.
- the classes to exclude
excludeNameString excludeNameExclude specific auto-configuration class names such that they will never be applied.
- the class names to exclude