Parsing of Springmvc method parameter customization

Source: Internet
Author: User

1, realize Handlermethodargumentresolver interface;

2. Add configuration to configuration file <mvc:argument-resolvers>
<bean class= "" ></bean>
</mvc:argument-resolvers>

Class file is the class defined in the first step

3. Define annotations to only parse the controller's method parameters with that annotation

The custom method parameter resolution realizes the unification of the front and back end data, for example, the form data is defined as a bean, and the front-end data is directly transmitted to the backend by defining the parameter resolution class.

Parsing of Springmvc method parameter customization

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.