Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Spring and Spring Boot

There are many people who advised me to use Spring Boot instead of Spring to develop REST web services. I want to know what exactly the difference between the two is?

like image 724
Cheps Avatar asked May 06 '15 15:05

Cheps


People also ask

What is the difference between spring & Spring boot?

Spring is an open-source lightweight framework widely used to develop enterprise applications. Spring Boot is built on top of the conventional spring framework, widely used to develop REST APIs.

What are the major differences between spring and spring boot project structure?

1. Spring is mainly concentrated on its core and MVC features where a developer needs to manually configure and define which feature needs to be used by the application as per requirement. Spring Boot, on the other hand, automatically loads all the features of Spring.

What is the difference between spring boot and spring MVC?

Spring Boot is considered a module of the Spring framework for packaging the Spring-based application with sensible defaults. Spring MVC is considered to be the model view controller-based web framework under the Spring framework. For building a Spring-powered framework, default configurations are provided by it.


2 Answers

In short

  1. Spring Boot reduces the need to write a lot of configuration and boilerplate code.
  2. It has an opinionated view on Spring Platform and third-party libraries so you can get started with minimum effort.
  3. Easy to create standalone applications with embedded Tomcat/Jetty/Undertow.
  4. Provides metrics, health checks, and externalized configuration.

You can read more here http://projects.spring.io/spring-boot/

like image 130
medvedev1088 Avatar answered Sep 22 '22 18:09

medvedev1088


Basically, Spring Boot is an opinionated instance of a Spring application.

Spring Boot is a rapid application development platform. It uses various components of Spring, but has additional niceties like the ability to package your application as a runnable jar, which includes an embedded tomcat (or jetty) server. Additionally, Spring Boot contains a LOT of auto-configuration for you (the opinionated part), where it will pick and choose what to create based on what classes/beans are available or missing.

I would echo their sentiment that if you are going to use Spring I can't think of any reasons to do it without Spring Boot.

like image 37
digitaljoel Avatar answered Sep 20 '22 18:09

digitaljoel