0% found this document useful (0 votes)
2 views

spring3

The document compares Spring Framework, Spring Boot, and Spring MVC, highlighting their features and use cases. Spring Framework focuses on dependency injection for loosely coupled applications, while Spring Boot simplifies application development with minimal configurations and reduces boilerplate code. Spring MVC is a web framework that requires manual configuration, contrasting with Spring Boot's automatic setup for faster development.

Uploaded by

Candy Man
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

spring3

The document compares Spring Framework, Spring Boot, and Spring MVC, highlighting their features and use cases. Spring Framework focuses on dependency injection for loosely coupled applications, while Spring Boot simplifies application development with minimal configurations and reduces boilerplate code. Spring MVC is a web framework that requires manual configuration, contrasting with Spring Boot's automatic setup for faster development.

Uploaded by

Candy Man
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Spring vs. Spring Boot vs.

Spring MVC
Spring vs. Spring Boot

Spring: Spring Framework is the most popular application development


framework of Java. The main feature of the Spring Framework
is dependency Injection or Inversion of Control (IoC). With the help of
Spring Framework, we can develop a loosely coupled application. It is
better to use if application type or characteristics are purely defined.

Spring Boot: Spring Boot is a module of Spring Framework. It allows us to


build a stand-alone application with minimal or zero configurations. It is
better to use if we want to develop a simple Spring-based application or
RESTful services.
Spring Spring Boot
Spring Framework is a widely used Java EE framework Spring Boot Framework is widely used to develop REST
for building applications. APIs.

It aims to simplify Java EE development that makes It aims to shorten the code length and provide the easiest
developers more productive. way to develop Web Applications.

The primary feature of the Spring Framework The primary feature of Spring Boot is Autoconfiguration.
is dependency injection. It automatically configures the classes based on the
requirement.

It helps to make things simpler by allowing us to It helps to create a stand-alone application with less
develop loosely coupled applications. configuration.

The developer writes a lot of code (boilerplate code) to do It reduces boilerplate code.
the minimal task.
Spring Boot vs. Spring MVC
Spring Boot: Spring Boot makes it easy to quickly bootstrap and start
developing a Spring-based application. It avoids a lot of boilerplate code. It
hides a lot of complexity behind the scene so that the developer can quickly
get started and develop Spring-based applications easily.

Spring MVC: Spring MVC is a Web MVC Framework for building web
applications. It contains a lot of configuration files for various capabilities. It
is an HTTP oriented web application development framework.
Spring Boot and Spring MVC exist for different purposes. The primary
comparison between Spring Boot and Spring MVC are discussed below:
Spring Boot Spring MVC
Spring Boot is a module of Spring for packaging Spring MVC is a model view controller-based
the Spring-based application with sensible web framework under the Spring framework.
defaults.

It provides default configurations to build Spring- It provides ready to use features for building a
powered framework. web application.

There is no need to build configuration manually. It requires build configuration manually.

There is no requirement for a deployment A Deployment descriptor is required.


descriptor.
It avoids boilerplate code and wraps It specifies each dependency separately.
dependencies together in a single unit.

It reduces development time and increases It takes more time to achieve the same.
productivity.
Spring Initializr

Spring Initializr is a web-based tool provided by the Pivotal Web Service.


With the help of Spring Initializr, we can easily generate the structure of
the Spring Boot Project. It offers extensible API for creating JVM-based
projects.

Spring Initializr Modules

initializr-actuator: It provides additional information and statistics on project


generation. It is an optional module.
initializr-docs: It provides documentation.
initializr-generator: It is a core project
generation library.
Generating a Project
Before creating a project, we must be friendly with UI. Spring Initializr UI has
the following labels:
Project: It defines the kind of project. We can create either Maven
Project or Gradle Project. We will create a Maven Project throughout the
tutorial.
Language: Spring Initializr provides the choice among three languages Java,
Kotlin, and Groovy. Java is by default selected.
Spring Boot: We can select the Spring Boot version. The latest version is 2.2.2.
Project Metadata: It contains information related to the project, such
as Group, Artifact, etc. Group denotes the package name; Artifact denotes
the Application name. The default Group name is com.example, and the
default Artifact name is demo.
Dependencies: Dependencies are the collection of artifacts that we can add to
our project.
There is another Options section that contains the following fields:
There is another Options section that contains the following fields:
Name: It is the same as Artifact.
Description: In the description field, we can write a description of the
project.
Package Name: It is also similar to the Group name.
Packaging: We can select the packing of the project. We can choose
either Jar or War.
Java: We can select the JVM version which we want to use. We will
use Java 8 version throughout the tutorial.
There is a Generate button. When we click on the button, it starts
packing the project and downloads the Jar or War file, which you have
selected.

You might also like