Spring boot and Spring MVC Explained

Spring Boot and Spring MVC are not comparable or mutually exclusive. If you want to do web application development using Spring, you would use Spring MVC anyway.

Spring MVC is a sub-project of the Spring Framework, targeting design and development of applications that use the MVC (Model-View-Controller) pattern. Spring MVC is designed to integrate fully and completely with the Spring Framework and transitively, most other sub-projects.

Spring Boot is supposedly opinionated, i.e. it heavily advocates a certain style of rapid development, but it is designed well enough to accommodate exceptions to the rule if you will. In short, it is a convention over configuration methodology that is willing to understand your need to break convention when warranted.

Spring MVC

  1. It is a HTTP oriented web application development framework and is one of the spring modules.
  2. Spring mvc enables a decoupled way of developing web applications. The web application can be implemented in accordance with model view controller design pattern.
  3. It is equivalent to Java Server Faces in the JavaEE stack. Classes annotated with @controller are the most popular elements.
  4. For implementation of Rest based APIs, it has an equivalent @RestController.

Spring Boot :

  1. Create of Quick Application so that, instead of manage single big web application we divide them individually into different Microservices which have their own scope & capability.
  2. Auto Configuration using Web Jar: In normal Spring there is a lot of configuration like DispatcherServlet, Component Scan, View Resolver, Web Jar, XML. (For example, if I would like to configure data source, Entity Manager Transaction Manager Factory). Configure automatically when it’s not available using class-path.
  3. Comes with Default Spring Starters, which come with some default Spring configuration dependency (like Spring Core, Web-MVC, Jackson, Tomcat, Validation, Data Binding, Logging). Don’t worry about versioning issue as well.

Related blog:

Java collection tutorials