Jump to content

Spring Boot

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Cngzz1 (talk | contribs) at 03:09, 2 July 2023 (Reordering the article). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Spring Boot
Original author(s)Rod Johnson
Developer(s)VMware
Initial releaseApril 2014; 11 years ago (2014-04)
Stable release
3.4.5[1] Edit this on Wikidata / 24 April 2025; 34 days ago (24 April 2025)
Repository
Written inJava
PlatformJava EE
TypeApplication framework
LicenseApache License 2.0
Websitespring.io/projects/spring-boot Edit this on Wikidata

Spring Boot Extension is Spring's convention-over-configuration solution for creating production-grade[2] Spring applications with minimal amounts of configuration.[3] Most of the application can be preconfigured using Spring team's "opinionated view"[4][5] of the best configuration and use of the Spring platform and third-party libraries. A Spring Boot application can be written using several programming languages, including Java and Kotlin.[6]

Features

Bootstrapping DispatcherServlet

Spring Boot does not require manual configuration of the DispatcherServlet, since it automatically configures the application based on the configuration it detects.[13]

Spring Boot has a class SpringBootServletInitializer, which is a specialization of the WebApplicationInitializer.[13] 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.[13]

Configuration properties

The configuration properties for the Spring Boot application can be specified in the application.properties or application.yml file.[13] Examples of properties that can be included in this file include the server.port and spring.application.name properties.[13]

Autoconfiguration

Spring boot has an annotation, @SpringBootApplication, which allows the Spring Boot application to autoconfigure third-party libraries and detected features found on the classpath.[13] 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.[13]

Actuator

The Spring Boot Actuator allows for monitoring and management capabilities for the Spring Boot Application.[14] A major advantage of using the Spring Boot Actuator is it implements a number of production-ready features without requiring the developer to construct their own implementations.[14]

If Maven used as the build tool, then the spring-boot-starter-actuator dependency can be specified in the pom.xml configuration file.[15]

Application Servers

By default, Spring boot provides embedded web servers (such as TomCat) out-of-the-box.[16] However, Spring Boot can also be deployed as a WAR file on a standalone WildFly application server.[17]

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.[17]

Citations

  1. ^ "Release 3.4.5". 24 April 2025. Retrieved 1 May 2025.
  2. ^ a b Walls 2016, p. vii, §foreword.
  3. ^ Walls 2016, pp. 37–48, §2.3.
  4. ^ Walls 2016, p. 48, §2.4.
  5. ^ Deinum & Cosmina 2021, pp. 21–22, §2 Spring Framework Fundamentals.
  6. ^ Musib 2022, p. 9, §1.2.2 Java vs Kotlin.
  7. ^ a b Walls 2016, p. 7, §1.1.3.
  8. ^ a b Walls 2016, p. x, §Preface.
  9. ^ Musib 2022, p. 9, §1.2.1 Maven vs Gradle.
  10. ^ Walls 2016, pp. 4–5, §1.1.2.
  11. ^ a b Walls 2016, pp. 124–139, §7.
  12. ^ Walls 2016, pp. 49–69, §3.1-§3.2.3.
  13. ^ a b c d e f g Deinum & Cosmina 2021, pp. 52–54, §2 Spring Framework Fundamentals - Spring Boot.
  14. ^ a b Musib 2022, pp. 144–145, §4.4 Spring Boot Actuator.
  15. ^ Musib 2022, pp. 145–146, §4.4.1 Configuring Spring Boot Actuator in a Spring Boot application.
  16. ^ Musib 2022, pp. 7–8, §1.1.4 Spring Boot components.
  17. ^ a b Musib 2022, pp. 406–417, §9.2 Deploying Spring Boot application as WAR in the wildfly application server.

References