Reputation: 2033
I am working with SpringMVC .Every thing going good but I have some doubts
1)What is the default scope for SpringMVC
2)What is the differnce between @pathvarible,@RequestParam
Upvotes: 1
Views: 2067
Reputation: 691635
The default scope is singleton.
Given the URL /foo/bar/1/bing?blam=zing
, 1
could be a path variable value (it's part of the path), and zing
could be a request parameter value:
@RequestMapping(value = "/foo/bar/{barId}/bing")
public void handle(@PathVariable("barId") Long barId, @RequestParam("blam") blamParameter) {
...
}
Upvotes: 3