Spring Source code Anatomy @PathVariable Detailed

Source: Internet
Author: User

After my analysis of the spring source code, @PathVariable must use caution, it does make your URL beautiful, but it sacrificed a lot of performance.
Spring first in mapping match, match not to start to go @pathvariable fuzzy match

See Spring Source code abstracthandlermethodmapping 289 Line

private void Addmatchingmappings (collection<t> mappings, list<match> matches, httpservletrequest request) {for (t mapping:mappings) {T match = getmatchingmapping (mapping, request), if (match! = null) {Matches.add (new match (MATC H, handlermethods.get (mapping)));}}}

This article is from the "Program Ape de banana" blog, please be sure to keep this source http://qiyubin.blog.51cto.com/3642349/1643451

Spring Source code Anatomy @PathVariable Detailed

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.