The advantages of SPRINGMVC with respect to Structs

Source: Internet
Author: User

The wise man said that he could not accept the things of others without thinking and estimating by himself. Information can only be a reference, as to whether it is correct, but also to distinguish themselves

several advantages of SPRINGMVC with respect to Structs :

1, SPRINGMVCHigher Security,structs2The framework is class-level interception, each timeRequestRequeststructs2will create one for itAction, and then inject the data into the entitybeenin, so instructs2, aActioncorresponds to aRequestcontext. Springmvcis a method-level intercept, eachRequestcorresponds to a method and then injects the data into the corresponding entity through annotations, so theSpringmvc, a method corresponds to aRequestcontext, the granularity is smaller, so saySpringmvcMore secure

2, Springmvc Direct use of annotations, the configuration is more concise and clear,structs2 All the path configuration in the structs.xml file, Multi-person development time is more prone to conflict, configuration is relatively complex, but this is also An advantage of structs2, that is, you can find all the paths in this file.

3, Springmvc exception handling mechanism is more excellent. structs2 action method declaration is thrown when exception exception, so we no longer need execute method catch exception, only in struts.xml springmvc

4, relative to Structs2,springmvc parameter transfer is more convenient. SPRINGMVC directly uses the corresponding entity to receive form information submitted by Form, and structs2 to The corresponding entity is specified in the form, otherwise structs cannot distinguish which entity the data in the form corresponds to

The advantages of SPRINGMVC with respect to Structs

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.