Parcourir la source

Clarify required=false

Dave Syer il y a 9 ans
Parent
révision
523b29d345
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1
    1
      README.adoc

+ 1
- 1
README.adoc Voir le fichier

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