balteo
balteo

Reputation: 24679

Various Spring MVC RequestMapping configuration questions

I have several (albeit related) questions about Spring MVC RequestMapping configuration:

  1. Say I have a type-level RequestMapping annotation as follows: @RequestMapping("/root/"). What is the difference between adding this method-level RequestMapping: @RequestMapping(value="leaf") and that one: @RequestMapping(value="/leaf")? Notice the leading slash in second method-level mapping.
  2. What is the difference between having this type-level RequestMapping: @RequestMapping("/root/") and that one @RequestMapping("/root/*")? Notice the star in second mapping.
  3. Say I already have a type-level RequestMapping annotation. How do I override the type-level mapping at the method-level so that the type-level mapping is ignored (for a given controller)?

Upvotes: 0

Views: 1327

Answers (1)

Biju Kunjummen
Biju Kunjummen

Reputation: 49915

Upvotes: 1

Related Questions