Dave
Dave

Reputation: 557

@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.

Upvotes: 2

Views: 1728

Answers (1)

kwh
kwh

Reputation: 664

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

Upvotes: 2

Related Questions