Closed david-arteaga closed 7 years ago
The javadoc says "true" is the default for the required attribute of @RequestParam
. But I'm not sure I know what you mean because you said "RequestMapping" and then linked to "RequestParam". The guide text is wrong, though, so we should fix that.
I meant RequestParam, sorry about that, and I read the javadoc wrong, . But the guide text as you say is incorrect.
Fixed in spring-guides/gs-rest-service@c29a1de. Please raise issues with individual guides if you find any more.
The guide at https://spring.io/guides/gs/rest-service/ and the docs (http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/bind/annotation/RequestParam.html#required--) say that the "required" param in the org.springframework.web.bind.annotation.RequestMapping annotation has a default value of false. In spite of that, when I run a project without specifying a value it defaults to true. In netbeans, when I checked the downloaded sources from Maven, the default is set to true.
There seems to be a contradiction there.