Spring Boot

Spring Boot is an open-source Java-based framework that creates a micro Service. An architecture that allows the developers to develop and deploy services independently is known as Micro Service. To achieve the lightweight model to support business applications, each service running has its own process. Spring boot helps in building stand-alone and production-ready spring applications because it needs minimal Spring configuration.

  • It provides an easier and faster way to set up, configure, and run both simple and web-based applications.
  • The RAD (Rapid Application Development) feature is provided to the Spring Framework by a Spring module known as Spring Boot.
  • It is the combination of Spring Framework and Embedded Servers.
  • Spring boot doesn’t require any XML configuration (deployment descriptor). It uses convention over configuration software design paradigm that means it decreases the effort of the developer.
  • We can use Spring STS IDE or Spring Initializer to develop Spring Boot Java applications. In this tutorial, we will discuss using Spring Initializer.

Prerequisite

  • Java 1.8
  • Maven 3.0+
  • Spring Framework 5.0.0.BUILD-SNAPSHOT

Features

  1. Starter Project
    • It provides a quick starter project (start.spring.io) with auto-configuration(web, JPA, dev tools, etc).
  2. Web Development
    • We can easily create a self-contained HTTP application that uses embedded servers like Tomcat, Jetty, or Undertow.
    • We can use the spring-boot-starter-web module to start and run the application quickly.
  3. SpringApplication
    • The SpringApplication is a class that provides a convenient way to bootstrap a Spring application. 
  4. Application events and listeners
    • It allows us to create factories file in the META-INF folder like META-INF/spring.factories that is useful for adding listeners.
  5. Admin features
    • It accesses & manages applications remotely by using spring.application.admin.enabled property.
  6. Externalized Configuration
    • It allows us to work with the same application in different environments
  7. YAML Support
    • It is a superset of JSON that externalizes configuration.
  8. Type-safe Configuration
    • It governs and validates the configuration of the application.
  9. Actuator
    • Spring boot Actuator helps us monitor and manage application when pushed to production.

How to create a Spring boot project?

TopicDefinition
ProjectIt defines the kind of project i.e. Maven Project or Gradle Project.
LanguageIt provides the choice among three languages Java, Kotlin, and Groovy. Java is by default selected.
Spring BootWe can select the Spring Boot version. The latest version is 2.2.2.
GroupIt denotes the package name. The default Group name is com.example
ArtifactIt denotes the Application name. The default Artifact name is a demo.
NameIt is the same as Artifact.
DescriptionIn the description field, we can write a description of the project.
Package NameIt is also similar to the Group name.
PackagingWe can select the packing of the project i.e. Jar or War.
JavaWe can select the JVM version which we want to use.
DependenciesDependencies are the collection of artifacts that we can add to our project.

Click on the Generate Project button, a zip file will download. After you download the project, unzip the file. 

Scroll to Top