Bladeren bron

Correct description of required attribute in @RequestParam

Dave Syer 8 jaren geleden
bovenliggende
commit
c29a1de4e7
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1
    1
      README.adoc

+ 1
- 1
README.adoc Bestand weergeven

@@ -106,7 +106,7 @@ The `@RequestMapping` annotation ensures that HTTP requests to `/greeting` are m
106 106
 
107 107
 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.
108 108
 
109
-`@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.
109
+`@RequestParam` binds the value of the query string parameter `name` into the `name` parameter of the `greeting()` method. This query string parameter is explicitly marked as optional (`required=true` by default): if it is absent in the request, the `defaultValue` of "World" is used.
110 110
 
111 111
 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`.
112 112