Home > Java > javaTutorial > body text

The difference between spring and springmvc

hzc
Release: 2020-06-15 16:18:07
Original
3158 people have browsed it

The difference between spring and springmvc

The difference between Spring and SpringMVC

Spring is a container framework for IOC and AOP, and SpringMVC is a Web framework added based on Spring functions. If you want to use SpringMVC, you must first rely on Spring.
To put it simply, SpringMVC can be compared to Struts.
Spring is a container framework for IOC and AOP. SpringMVC is a Web framework added based on Spring functions. If you want to use SpringMVC, you must first rely on Spring.
Spring can be said to be a container that manages beans, or it can be said to be a general term for many open source projects. Spring mvc is one of the open source projects, so if you follow a simple process, once the http request arrives, it will be sent by the container (such as: tomact ) parses http into a request, and uses the spring mvc distributor to find the bean that can handle the request through the mapping relationship (path, method, parameter). Then in tomcat, the bean is managed by spring in a pool (bean container) Found and processed, the response is returned.

  • SpringMVC is a WEB development framework in MVC mode;

  • Spring is a universal solution, and its greatest use is to solve the problem through Ioc/AOP Coupling, reducing software complexity, so Spring can be used in conjunction with many other solutions such as SpringMVC, not only suitable for WEB development

Spring is a solution to many problems in J2EE development A powerful framework for frequently asked questions. Spring provides a consistent way to manage business objects and encourages the good habit of programming to interfaces rather than classes. The architectural foundation of Spring is based on the Inversion of Control container using JavaBean properties. However, this is only part of the complete picture: Spring is unique in using IOC containers as a complete solution that focuses on all architectural layers. Spring provides the only data access abstraction, including a simple and efficient JDBC framework, greatly improving efficiency and reducing possible errors. Spring's data access architecture also integrates Hibernate and other O/R mapping solutions. Spring also provides the only transaction management abstraction that can provide a consistent programming model across various underlying transaction management technologies, such as JTA or JDBC transactions. Spring provides an AOP framework written in the standard Java language, which provides declarative transaction management and other enterprise affairs for POJOs and - if you need - you can also implement your own aspects. This framework is powerful enough to enable applications to put aside the complexity of EJB while enjoying the key services associated with traditional EJB. Spring also provides a powerful and flexible MVC Web framework that can be integrated with IoC containers.

Recommended tutorial: "java tutorial"

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template