Browse Source

Clarify required=false

Dave Syer 9 years ago
parent
commit
523b29d345
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      README.adoc

+ 1
- 1
README.adoc View File

@@ -107,7 +107,7 @@ The `@RequestMapping` annotation ensures that HTTP requests to `/greeting` are m
107 107
 
108 108
 NOTE: The above example does not specify `GET` vs. `PUT`, `POST`, and so forth, because `@RequestMapping` maps all HTTP operations by default. Use `@RequestMapping(method=GET)` to narrow this mapping.
109 109
 
110
-`@RequestParam` binds the value of the query string parameter `name` into the `name` parameter of the `greeting()` method. This query string parameter is not `required`; if it is absent in the request, the `defaultValue` of "World" is used.
110
+`@RequestParam` binds the value of the query string parameter `name` into the `name` parameter of the `greeting()` method. This query string parameter is optional (`required=false` by default): if it is absent in the request, the `defaultValue` of "World" is used.
111 111
 
112 112
 The implementation of the method body creates and returns a new `Greeting` object with `id` and `content` attributes based on the next value from the `counter`, and formats the given `name` by using the greeting `template`.
113 113