Joke Collection Website - Mood Talk - The difference between spring boot and spring MVC usage and configuration.

The difference between spring boot and spring MVC usage and configuration.

Spring Boot is just a carrier to help you simplify the project construction process. If you are hosting a WEB project and use Spring MVC as the MVC framework, then the workflow is exactly the same as what you described above, because this part of the work is done by Spring MVC and not Spring Boot.

For users, after switching to Spring Boot, the project initialization method has changed, the configuration file has changed, and there is no need to separately install a container server such as Tomcat. Maven can run the jar package directly. It's just a website, but there is no change in your core business logic implementation and business process implementation.

Spring MVC is a follow-up product of Spring Frame Work 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, you can choose to use the built-in Spring Web framework or a Web framework such as Struts.

Basic information

The Spring framework provides a full-featured MVC module for building Web applications. Using Spring's pluggable MVC architecture, you can choose whether to use the built-in Spring web framework or a web framework like Struts. The Spring Framework is highly configurable through policy interfaces and includes multiple view technologies such as JavaServer Pages (JSP) technology, Velocity, Tiles, iText, and POI. The Spring MVC framework is unaware of the views used, so it does not force you to use only JSP technology. Spring MVC separates the roles of controllers, model objects, dispatchers, and handler objects, making them easier to customize.

Introduction to advantages

Lifecycle for overriding binding, validation, etc.; easy to integrate seamlessly with other View frameworks (Titles, etc.), and uses IOC to facilitate testing.

It is a typical textbook mvc architecture, unlike struts, which are all variants or not completely based on the mvc system. For beginners or people who want to understand mvc, I think spring is Best of all, its implementation is textbook! Second, it is a pure servlet system like tapestry, which is an advantage it does not have over struts compared to tapestry. Moreover, the framework itself has code, and it does not look difficult and is relatively simple and understandable.

Make good use of annotations

MVC is already a very important part of modern Web development. Here are some tips on using Spring MVC.

Previous projects were relatively simple, mostly done directly using JSP and Servlet JDBC. Last year, I started to try to use Struts (Spring MVC) and Spring Hibernate in the project, strictly following the layered concept to drive project development. Due to project needs It has been constantly changing, the functions have been continuously expanded and enhanced, and the technical construction has also changed several times. Now we have a stable application and have experienced a lot of feelings. This time I will give some personal summary of the Spring MVC layer.