Search code examples
spring-mvcspring-roo

@requestmapping params="form"


Could someone explain the params="form" parameter in requestmapping?
For example like this:

@RequestMapping(value = "/{id}", params = "form", method = RequestMethod.GET)

I understand the {id} is being passed in as a number and and the GET is self explanatory, but the params = "form" puzzles me. I'm obviously new to Spring MVC, and I can't find an explanation. If anyone knows of a good tutorial covering this subject I'd appreciate it.


Solution

  • That ensures that the URL has the query parameter 'form'.

    So that RequestMapping would match an url like this: some_url/123?form but not some_url/123