[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

posted on 2012-03-26 22:28  leaving  阅读(475)  评论(0)    收藏  举报