Home  >  Article  >  Java  >  What is the difference between SpringBoot and SpringMVC?

What is the difference between SpringBoot and SpringMVC?

Guanhui
GuanhuiOriginal
2020-06-09 15:27:294238browse

What is the difference between SpringBoot and SpringMVC?

What is the difference between SpringBoot and SpringMVC?

SpringBoot is a new framework designed to simplify the initial construction and development process of new Spring applications, while SpringMVC is the implementation of MVC built into the Spring framework and is used to solve problems in WEB development. Frequently Asked Questions.

SpringMVC

Spring MVC is a follow-up product of SpringFrameWork and has been integrated into Spring Web Flow. The Spring framework provides full-featured MVC modules for building web applications. Using Spring's pluggable MVC architecture, when using Spring for WEB development, you can choose to use Spring's Spring MVC framework or integrate other MVC development frameworks, such as Struts1 (generally not used now), Struts 2 (generally used in old projects), etc.

SpringBoot

The Spring framework is an open source application framework on the Java platform, providing a container with control inversion characteristics. Although the Spring framework itself has no restrictions on the programming model, its frequent use in Java applications made it so popular that it was later used as a supplement or even a substitute for the EJB (Enterprise JavaBeans) model. The Spring framework provides a series of solutions for development, such as utilizing the core features of inversion of control and implementing inversion of control through dependency injection to implement containerization of the managed object life cycle, using aspect-oriented programming for declarative transaction management, and integration A variety of persistence technologies manage data access, provide a large number of excellent web frameworks to facilitate development, and so on. The Spring framework has the Inversion of Control (IOC) feature. IOC is designed to facilitate project maintenance and testing. It provides a method for unified configuration and management of Java objects through Java's reflection mechanism. The Spring framework uses containers to manage the life cycle of objects. The container can configure objects by scanning XML files or specific Java annotations on classes. Developers can obtain objects through dependency lookup or dependency injection. The Spring framework has an aspect-oriented programming (AOP) framework. The Spring AOP framework is based on the proxy mode and is configurable at runtime; the AOP framework mainly modularizes cross-concerns between modules. The AOP framework of the Spring framework only provides basic AOP features. Although it cannot be compared with the AspectJ framework, it can also meet basic needs through integration with AspectJ. Transaction management, remote access and other functions under the Spring framework can be realized by using Spring AOP technology. Spring's transaction management framework brings an abstraction mechanism to the Java platform that enables local and global transactions, as well as nested transactions, to work with savepoints and in almost any environment on the Java platform. Spring integrates a variety of transaction templates. The system can configure transactions through transaction templates, XML or Java annotations, and the transaction framework integrates functions such as messaging and caching. Spring's data access framework solves common difficulties developers encounter when using databases in their applications. It not only provides support for all popular data access frameworks such as Java: JDBC, iBATS/MyBATIs, Hibernate, Java Data Objects (JDO), ApacheOJB and ApacheCayne, but can also be used with Spring's transaction management to provide data access. Flexible abstraction. The Spring framework did not initially intend to build its own WebMVC framework. During the development process, its developers believed that the separation between the presentation layer and the request processing layer of the existing StrutsWeb framework and between the request processing layer and the model was not enough, so they created SpringMVC.

Recommended tutorial: "Java Tutorial"

The above is the detailed content of What is the difference between SpringBoot and SpringMVC?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn