Introduction of Spring Boot

Introduction of Spring Boot

The history of Spring Boot

In October 2002, Rod Johnson wrote a book titled Expert One-on-One J2EE Design and Development. Published by Wrox, this book covered the state of Java enterprise application development at the time and pointed out a number of major deficiencies with Java EE and EJB component framework. In the book he proposed a simpler solution based on ordinary java classes (POJO - plain old java objects) and dependency injection. Following is an excerpt from the book, In October 2012, Mike Youngstrom‏ created a feature request in spring jira asking for support for containerless web application architectures in spring framework. He talked about configuring web container services within a spring container bootstrapped from the main method! Here is an excerpt from the jira request,

Spring Boot is a microservice framework for building and packaging the spring applications as a microservice. If you are a spring developer, then you would realize that spring has lot more than just a Web framework.

Spring Boot solve the problem of hard configuration in all the applications which used spring framework.

 The main goal of Spring Boot is to reduce Development, Unit Test and Integration Test time and to ease the development of Production ready web applications very easily compared to existing Spring Framework, which really takes more time by avoid XML Configuration completely and avoid defining more Annotation Configuration.

spring-boot  

Spring Boot is the combination of Spring Framework and Embedded Servers. In Spring Boot, there is no requirement for XML configuration (deployment descriptor). It uses convention over configuration software design paradigm that means it decreases the effort of the developer. The Spring Boot framework is designed for this type of implementation where it is a “framework that pulls together a number of common application frameworks (mostly the various spring frameworks) for writing enterprise Java code, providing a quick way to write an enterprise application and deploy it as a single executable jar. Spring Boot is the combination of Spring Framework and Embedded Servers. In Spring Boot, there is no requirement for XML configuration (deployment descriptor). It uses convention over configuration software design paradigm that means it decreases the effort of the developer.

Why do we need Spring Boot?

Spring based applications have a lot of configuration.

When we use Spring MVC, we need to configure component scan, dispatcher servlet, a view resolver, web jars(for delivering static content) among other things.

When we use Hibernate/JPA, we would need to configure a datasource, an entity manager factory, a transaction manager among a host of other things.

Spring Boot looks at a) Frameworks available on the CLASSPATH b) Existing configuration for the application. Based on these, Spring Boot provides basic configuration needed to configure the application with these frameworks. This is called Auto Configuration

. What are the benefits of Spring Boot

The benefits of Spring Boot are as per the following:

  • Course Curriculum
  • Spring Framework Certification Training
  • Educator drove Sessions, Real-life Case Studies, Assignments and Lifetime Access
  • Gives auto-setup to stack a bunch of default design for a speedy beginning of the application
  • Makes independent applications with a scope of non-practical highlights that are normal to huge classes of activities
  • It accompanies inserted tomcat, servlet compartments breakwater to keep away from the utilization of WAR records
  • Spring Boot gives a stubborn view to diminish the engineer exertion and improve on expert arrangements

Features

  • Create stand-alone Spring applications
  • Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
  • Provide opinionated 'starter' POMs to simplify your Maven configuration
  • Automatically configure Spring whenever possible
  • Provide production-ready features such as metrics, health checks and externalized configuration
  • Absolutely no code generation and no requirement for XML configuration
  • With Spring Boot, developers can add dependencies in their project with ease.
  • With its Spring Boot CLI (Command Line Interface by Spring), developers can write in Groovy, a programming language for the Java platform that simplifies the development process.
  • With Spring Boot, developers can add dependencies in their project with ease.
  • With its Spring Boot CLI (Command Line Interface by Spring), developers can write in Groovy, a programming language for the Java platform that simplifies the development process.
  • The main goal of Spring Boot Framework is to reduce Development, Unit Test and Integration Test time and to ease the development of Production ready web applications very easily compared to existing Spring Framework, which really takes more time.

I presume that according to you Spring means (Spring-core), so here goes the answer…

Spring core is basically the module which encapsulates all the core functionalites present within the spring framework, functionalities like Dependency injection, Aspects etc etc.

Spring boot is the module in the spring framework which is primarily used for developing web applications. Via Its main slogan : convention over configuration, it eases the effort which is required from development to deployment through giving the developer a set of default configurations which he/she can override or use the default. You can easily spin up a web app which serves rest API’s in minutes, when compared to WAR files which needs a web container to run on, which in turn requires confuguration.

Advantages of Spring Boot:

  • It is very easy to develop Spring Based applications with Java or Groovy.
  • It reduces many development time and increases productivity.
  • It avoids writing many boilerplate Code, Annotations and XML Configuration.
  • It is very easy to integrate Spring Boot Application with its Spring Ecosystem like Spring JDBC, Spring ORM, Spring Data, Spring Security etc.
  • It follows “Opinionated Defaults Configuration” Approach to scale back Developer effort
  • It provides Embedded HTTP servers like Tomcat, Jetty etc. to develop and test our web applications very easily.
  • Spring Boot is a microservice-based framework and making a production-ready application in it takes very less time. It is a Spring module that provides the RAD (Rapid Application Development) feature to the Spring Framework.

Disadvantages of Spring Boot

  • Most important feature of Spring Framework is Dependency Injection. At the core of all Spring Modules is Dependency Injection or IOC Inversion of Control.
  •  spring projects is that configuration is really time-consuming and can be a bit overwhelming for the new developers. Making the application production-ready takes some time if you are new to the spring.
  • Solution to this is Spring Boot. Spring Boot is built on the top of the spring and contains all the features of spring. And is becoming favourite of developer’s these days because of it’s a rapid production-ready environment which enables the developers to directly focus on the logic instead of struggling with the configuration and set up.

    Spring Boot is a microservice-based framework and making a production-ready application in it takes very less time. It is a Spring module that provides the RAD (Rapid Application Development) feature to the Spring Framework.