liveBook · Manning

Spring Boot autoconfiguration

Also called auto-configuration

Spring Boot autoconfiguration is a mechanism that automatically configures application components based on available dependencies, settings, and environmental conditions.

How 2 Manning books explain it

Spring in Action, Sixth Edition

A Spring Boot mechanism that conditionally configures application components based on the classpath, properties, environment, and other application conditions.

How it is used
Reduces explicit component configuration so application code can focus on functionality.
How deep it goes
Explains activation and observable configuration through web and security examples, without detailing internal decision rules.
Examples
Uses a web application with Thymeleaf and embedded Tomcat, then adds a security starter and tests the default login.
What you can do after
Apply it via Spring Boot to start a web application and enable basic security by adding starter dependencies.

Read how Spring in Action, Sixth Edition explains Spring Boot autoconfiguration →

Testing Spring Boot Applications

Auto-configuration is Spring Boot's automatic configuration of application components and library integrations based on the available environment and configuration.

How it is used
Configures application-context components and library integrations automatically, then supports broader tests that exercise Spring configuration.
How deep it goes
Explains classpath discovery, bean registration, test exclusions, and replacement configuration; stops short of describing autoconfiguration internals.
Examples
Uses a discovered WidgetValidator, a StubWidgetValidator replacement, test properties, and an annotated custom test configuration.
What you can do after
Configure test application contexts that retain useful autoconfiguration while excluding unsuitable components and substituting programmable stubs.

Read how Testing Spring Boot Applications explains Spring Boot autoconfiguration →

Also covered in

Related concepts

Questions about Spring Boot autoconfiguration

What is Spring Boot autoconfiguration?

Spring Boot autoconfiguration is a mechanism that automatically configures application components based on available dependencies, settings, and environmental conditions.

Which Manning books explain Spring Boot autoconfiguration?

Spring in Action, Sixth Edition and Testing Spring Boot Applications.

What should I know before learning Spring Boot autoconfiguration?

Manning books that teach Spring Boot autoconfiguration usually introduce Java first.

What is Spring Boot autoconfiguration also called?

Spring Boot autoconfiguration is also called auto-configuration.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.