Differences Between spring boot and spring mvc and their functions

Source: Internet
Author: User

Differences Between spring boot and spring mvc and their functions

The Spring framework is like a family with many derivative products, such as boot, security, and jpa. However, they are based on Spring ioc and aop ioc, which provide dependency injection container aop, which solves cross-section programming and then implements advanced functions of other extended products based on the two. Spring MVC is a Servlet-based MVC framework that mainly solves WEB development problems. Due to the complicated configuration of Spring, various XML, JavaConfig, and hin processes are complicated. Therefore, in order to simplify the use of developers, Spring boot is introduced creatively, and the conventions are better than the configuration, which simplifies the spring configuration process.

To make it easier: Spring initially decouples application components using the "factory mode" (DI) and "Agent Mode" (AOP. We thought it was quite useful, so we developed an MVC Framework (some components decoupled from Spring) in this mode and developed web applications (SpringMVC ). Then I found that I wrote a lot of sample code for each development. To simplify the workflow, I developed some "starter integration package", which is Spring Boot.

Functions of Spring MVC

Spring MVC provides a lightweight coupling method for developing web applications.

Spring MVC is a module of Spring and a web framework. Through Dispatcher Servlet, ModelAndView, and View Resolver, it is easy to develop web applications. The problem solved is the development of website applications or services-URL routing, Session, template engine, static Web resources, and so on.

Functions of Spring Boot

Spring Boot implements automatic configuration, reducing the complexity of project building.

As we all know, the Spring framework requires a lot of configuration. Spring Boot introduces the concept of automatic configuration, making it easy to set the project. Spring Boot does not provide the core features and extension functions of the Spring framework, but is only used to quickly and quickly develop a new generation of applications based on the Spring framework. That is to say, it is not a solution to replace Spring, but a tool closely integrated with the Spring framework to improve the Spring developer experience. At the same time, it integrates a large number of common third-party library configurations (such as Jackson, JDBC, Mongo, Redis, Mail, and so on ), in Spring Boot applications, these third-party libraries can be used out-of-the-box without configuration. Most Spring Boot applications only need a small amount of configuration code, developers can focus more on business logic.

Spring Boot is just the bearer, helping you simplify the project building process. If the WEB Project is hosted and Spring MVC is used as the MVC Framework, the workflow is exactly the same as the one described above, because this part of work is done by Spring MVC rather than Spring Boot.

For users, after using Spring Boot, the project initialization method has changed and the configuration file has changed. In addition, you do not need to install Tomcat container servers separately, running the jar package in maven is a website, but the implementation of your core business logic and business process remains unchanged.

Therefore, the most concise language is:

Spring is an "engine ";

Spring MVC is a Spring-based MVC framework;

Spring Boot is a set of rapid development integration packages registered based on Spring 4 conditions.

Summary

The differences between spring boot and spring mvc and their functions are described in the above section. I hope to help you. If you have any questions, please leave a message, the editor will reply to you in time!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.