Difference between Spring and Spring boot

In this post, we will see difference between Spring and Spring boot.

If you have followed spring project over time, you might have noticed it has become increasingly complex. If you want to create a spring application, you still need to put a lot of efforts. Spring boot is introduced to save time to bootstrap the spring projects. Spring boot is a way to create an application with zero or minimal configurations. It provides a lot of defaults and configuration to create Spring applications faster.


Spring framework

Spring framework is the most widely used Java framework for building application. Spring framework has a lot of projects to develop java application.

It has good features like dependency injection and modules such as

Spring framework

For example:

You can avoid a lot of boilder plate code with Spring JDBC rather than using Java’s JDBC APIs.


Spring boot

As already stated above, Spring boot helps you to create Spring projects faster by eliminating boilerplate configurations.

It takes an opinionated view of Spring platform to bootstrap application faster.

Here are some advantages of Spring boot

Spring boot

Advantages of Spring Boot

  • Spring provides a lot of default configurations which helps in bootstrapping spring application faster.
  • It comes with embedded tomcat or jetty server.
  • It reduces development time by avoiding a lot of boilerplate code.
  • It increases productivity as you can create Spring application quickly.
  • It provides a lot of starter project for easy maven integration. You don’t have to worry about version mismatch.
  • You can quickly create using sample project using spring boot initializer

Spring vs Spring boot

We will see how Spring boot can reduce your efforts to bootstrapping any spring application.

Let’s say you want to create a web application.

We need to declare DispatcherServlet in web.xml for spring MVC. When DisplatcherServlet is initialized, spring tries to load application context from [servlet name]-servet.xml file

Configuration in “springmvc-dispatcher-servlet.xml” to provide InternalResourceViewResolver.

If you want to do same thing using Spring boot

All the Spring configuration will be automatically loaded by adding Spring boot starter and it will take care of all the default configurations.
If you want to do any customization, it is very easy to do with Spring boot.

That’s all about difference between Spring and Spring boot.


Was this post helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *