Skip to content

Spring Vs Spring Boot

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.

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

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

<?xml version="1.0" encoding="UTF-8"?><web-app xmlns="" xmlns:xsi="" xsi:schemaLocation="" version="3.0">   
<display-name>Archetype Created Web Application</display-name> 
  <welcome-file-list>      <welcome-file>index.jsp</welcome-file>   

</welcome-file-list>   <servlet>     
<load-on-startup>1</load-on-startup>   </servlet>   
<servlet-mapping>      <servlet-name>springmvc-dispatcher</servlet-name>     

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

<?xml version="1.0" encoding="UTF-8"?><beans xmlns="" xmlns:context="" xmlns:mvc="" xmlns:xsi="" xsi:schemaLocation="">   <context:component-scan base-package="org.student.bootcamp.springmvc.controller" />   <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">      <property name="prefix">         <value>/WEB-INF/</value>      </property>      <property name="suffix">         <value>.jsp</value>      </property>   </bean>   <mvc:annotation-driven /></beans>

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.

Translate »