...

/

Auto-Configuration and Actuator

Auto-Configuration and Actuator

Learn about auto-configuration in Spring Boot, along with the Spring Boot Actuator.

Auto-configuration

Spring Boot considers the runtime of your application and automatically configures your application based on many factors, such as libraries on the classpath.

It follows the motto: “If everyone has to do it, then why does everyone have to do it?”

For example, to create an MVC web app, you need to add a configuration class, multiple dependencies, and configure a tomcat container. With Spring Boot, all you need to add is a dependency and a controller class, and it will automatically add tomcat.

Actuator

The Spring Boot Actuator allows you to see the insides of your application, including environment properties, mappings, metrics, and so much more. It exposes information using a set of rest endpoints and JMX MBeans. It even allows you to change settings at runtime (you can turn that off). This can be extremely useful.

To get started with Actuator, first add it to your ...