Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

java
springboot
springmvc
microservices
communitycreator

What is the difference between Spring MVC and Spring boot?

Sandeep

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Spring MVC is a framework that is used to build web applications. It follows the Model View Controller pattern. DispatcherServlet is the servlet that controls the flow of a request from view to controller. Since Spring 3.1, the Servlet 3 API is supported and we no longer need web.xml for configuring DispatcherServlet – instead, it is configured programmatically. We implement a class with the WebApplicationInitializer interface and add the onStartup() method to add DispatcherServlet to ServletContext. The @Controller annotation on class name declares this class as a Spring bean, and the @RequestMapping annotation declares that this class is the default handler for all requests of type ‘/’.

Spring Boot requires no configuration; it is used to create production-ready applications with zero XML configuration in your project. We don’t need a deployment descriptor, web server, etc. It wraps all dependencies under spring-boot-started-web, comes with an embedded server, and can be packaged as a jar. @SpringBootApplication is the @Configuration, @EnableAutoConfiguration, and @ComponentScan annotations combined and configured with their default attributes.

Spring boot, which is built on Spring, is easy to learn and comes with built-in features that reduce the learning curve. It is well-suited for container based development and deployment of microservices.

RELATED TAGS

java
springboot
springmvc
microservices
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring