[springmvc]mapping request

1. by path

@RequestMapping("path")

2. by http method

@RequestMapping("path", method=RequestMethod.GET)

3. by presence of query parameter

@RequestMapping("path", method=RequestMethod.GET, params="foo")
Negation also supported: params={ "foo", "!bar" })

4. by presence of request header

@RequestMapping("path", header="content-type=text/*")

5. class level & method level

原文地址:https://www.cnblogs.com/lavieenrose/p/2418703.html