Spring Boot is an open-source Java framework used for programming standalone, production-grade Spring-based applications with a bundle of libraries that make project startup and management easier.[3] Spring Boot is a convention-over-configuration extension for the Spring Java platform intended to help minimize configuration concerns while creating Spring-based applications.[4][5] The application can still be adjusted for specific needs, but the initial Spring Boot project provides a preconfigured "opinionated view" of the best configuration to use with the Spring platform and selected third-party libraries.[6][7]
Spring Boot can be used to build microservices, web applications, and console applications.[3][8]
Spring Boot does not require manual configuration of the DispatcherServlet, since it automatically configures the application based on the configuration it detects. [16]
DispatcherServlet
Spring Boot has a class SpringBootServletInitializer, which is a specialization of the WebApplicationInitializer.[16] This SpringBootServletInitializer is an out-of-the-box implementation of WebApplicationInitializer, which eliminates the need for the developer to construct their own implementation of the WebApplicationInitializer class.[16]
SpringBootServletInitializer
WebApplicationInitializer
The configuration properties for the Spring Boot application can be specified in the application.properties or application.yml file.[16] Examples of properties that can be included in this file include the server.port and spring.application.name properties.[16]
application.properties
application.yml
server.port
spring.application.name
Spring boot has an annotation, @SpringBootApplication, which allows the Spring Boot application to autoconfigure third-party libraries and detected features found on the classpath.[16] As an example, the class that has the @SpringBootApplication annotation can extend the SpringBootServerInitializer class if the application is packaged and deployed as a WAR file.[16]
@SpringBootApplication
SpringBootServerInitializer
The @SpringBootApplication annotation combines three Spring-specific annotations: @SpringBootConfiguration, @EnableAutoConfiguration and @ComponentScan.[17]
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan
The @SpringBootConfiguration annotation is a specialization of the Spring-specific @Configuration annotation.[17] The class with the @SpringBootConfiguration is marked as the configuration class for the Spring Boot application.[17]
@Configuration
The @EnableAutoConfiguration annotation is Spring-specific annotation that enables the Spring Boot automatic configuration. [17]
The Spring Boot Actuator allows for monitoring and management capabilities for the Spring Boot Application.[18] A major advantage of using the Spring Boot Actuator is that it implements a number of production-ready features without requiring the developer to construct their own implementations.[18]
If Maven is used as the build tool, then the spring-boot-starter-actuator dependency can be specified in the pom.xml configuration file.[19]
spring-boot-starter-actuator
pom.xml
Spring Boot has a number of existing Spring Framework Modules.
Spring Boot has integration with the Spring Security Module. The simplest way for integrating Spring Boot with Spring Security is to declare the starter dependency in the build configuration file.[20]
If Maven is used as the build tool, then the dependency with artifact ID spring-boot-starter-security dependency can be specified in the pom.xml configuration file.[20]
spring-boot-starter-security
By default, Spring boot provides embedded web servers (such as Tomcat) out-of-the-box.[21] However, Spring Boot can also be deployed as a WAR file on a standalone WildFly application server.[22]
If Maven is used as the build tool, there is a wildfly-maven-plugin Maven plugin that allows for automatic deployment of the generated WAR file.[22]
wildfly-maven-plugin