JAVA : Spring Boot Features ?

Motivation

These are some of the most important features of the springboot

Autoconfiguration :

if the classes are present in the classpath or JAR are present spring can configure it for you Ex.

  1. if JPA and hibernate are present spring can configure it for you if the spring security.jar is present it can configure for you.

  2. By default this feature is disabled it can be enabled by using the @SpringBootApplication annotation.

without this lets say if we wants to connect to h2 database we need to configure jdbc template and datasource classes but with springboot it will do the auto-configuration and we can use it directly.

Starter POM's

    1. As autoconfiguration takes away the pain of configuring the basic functionalities the , starter poms take away the pain of finding and adding the common dependencies to your pom
  • Example : spring-boot-starter-web --> it combines, spring web, spring mvc, spring core and tomcat dependencies.

so we can directly use the spring-boot-starter-web dependency and it will internally use these dependencies, it takes away the pain of managing all the different dependencies and the version.

Spring Boot CLI

  1. we can create simple rest application using groovy and can run it using spring CLI. SpringCLI internally uses autoconfiguration and starter pom to run the project.

Actuators

with all this auto configuration, if we wants to see what is going on inside the spring application we can do this using the actuators.

spring provides rest rest endpoints and shell feature to securely go inside teh application and get all the information.

We can get the CPU, memory usage garbage collections details, web requests.

We can get what are the beans configured in application context. what are teh auto-configuration decisions made and what environment variables, system properties, command line arguments are available to an application and much more.

SpringBoot initializer,

this solves the problem of creation of project, it makes it simpler, it is web based application that will help with the project creation, give the project name , select the dependencies and download the zip file and then import the project and now you can just run mvn install it will download all the dependencies for you in your local. :)