Comparison of Spring mvc and Struts2

Advantages of spring:
1. Spring mvc configuration can be configured through annotations to write classes to achieve 0 configuration, while struts2 needs to use the traditional configuration file method

2. Spring mvc will be better in performance. spring mvc is method based design while struts2 is class based.
The struts2 framework is a class-level interception. Every time a request comes, an Action is created, and then the setter getter method is called to inject the data in the request; in struts2, an Action object corresponds to a request context. While spring is based on methods, spring3 mvc is a method-level interception. After intercepting the method, the request data is injected into it according to the annotations on the parameters. In spring3 mvc, a method corresponds to a request context.

3. The integration efficiency with spring is higher than that of struts2

. Advantages of struts2:
1. Rich tag library

2. Powerful verification function

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327017023&siteId=291194637