When coding with Spring, every Java Developer has dealt with boilerplate configurations. Spring Boot was designed to solve the problem of making spring developer’s life easy.
When Spring Framework arrived on the scene for Java Developers, it was a godsend.
Every java developer stopped using the much messier and complex option of EJB and a flock of developers started migrating to Spring Framework.
Spring Framework provided the Java developers an easy way to boot up their projects in comparison to Java EE.
While Spring Framework was much relief for developers working on class interaction and DAO’s (Data access objects), it also grew very rapidly and now has more than a hundred components.
It is a very difficult task for any developer to remember the configuration of all those 100+ components.
Most users just wanted to use the default configuration.
There was another concern among developers about maintaining versions of these pool of components compatible with each other.
Spring Boot to the rescue
Spring Boot solved the problem by taking away dependency management and providing default configuration.
Let’s take a look,
Spring Boot provides solution to these problems + more,
-
Configuration Helpers
-
Starters
Spring Boot comes with several starter projects that you can simply add to your project bring in the related dependencies.
-
AutoConfigure
Spring Boot provides the defauilt auto configured components when you bring the starter project.
-
-
Tools
-
Actuators
Spring Boot provides a starter project asspring-boot-starter-actuator
than helps understand environment details and debug spring boot application
-
You start by adding the below parent project in your pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.0.BUILD-SNAPSHOT</version>
</parent>
Then you add spring to your project by adding a single dependency below, spring boot pulls up spring-core and all its dependencies
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
Now say you want to add JPA to your project, you don’t need to worry about the version of spring JPA library that will work with spring core.
Spring boot will ensure that the versions are compatible by keeping compatible version list in the <artifactId>spring-boot-starter-parent</artifactId>
project
As a developer, your mind is no focused not on maintaining jar dependencies or the standard configuration,
you would be more focused on the business problem at hand.
Spring boot provides several tools to make job easy,
I believe the spring boot project will soon replace the spring framework and will become one.