Replace 'e.g.' with 'for example' in documentation and comments
Closes gh-33515
This commit is contained in:
committed by
Sam Brannen
parent
e55fe9077f
commit
8941e2876e
@@ -13,8 +13,8 @@ include-code::./SimpleController[indent=0]
|
||||
[[mvc-ann-exceptionhandler-exc]]
|
||||
== Exception Mapping
|
||||
|
||||
The exception may match against a top-level exception being propagated (e.g. a direct
|
||||
`IOException` being thrown) or against a nested cause within a wrapper exception (e.g.
|
||||
The exception may match against a top-level exception being propagated (for example, a direct
|
||||
`IOException` being thrown) or against a nested cause within a wrapper exception (for example,
|
||||
an `IOException` wrapped inside an `IllegalStateException`). As of 5.3, this can match
|
||||
at arbitrary cause levels, whereas previously only an immediate cause was considered.
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ parameters. While `@BindParam` is supported out of the box, you can also use a
|
||||
different annotation by setting a `DataBinder.NameResolver` on `DataBinder`
|
||||
|
||||
Constructor binding supports `List`, `Map`, and array arguments either converted from
|
||||
a single string, e.g. comma-separated list, or based on indexed keys such as
|
||||
a single string, for example, comma-separated list, or based on indexed keys such as
|
||||
`accounts[2].name` or `account[KEY].name`.
|
||||
|
||||
In some cases, you may want access to a model attribute without data binding. For such
|
||||
|
||||
@@ -42,7 +42,7 @@ content of the provided resource to the response `OutputStream`. Note that the
|
||||
`InputStream` should be lazily retrieved by the `Resource` handle in order to reliably
|
||||
close it after it has been copied to the response. If you are using `InputStreamResource`
|
||||
for such a purpose, make sure to construct it with an on-demand `InputStreamSource`
|
||||
(e.g. through a lambda expression that retrieves the actual `InputStream`).
|
||||
(for example, through a lambda expression that retrieves the actual `InputStream`).
|
||||
|
||||
You can use `@ResponseBody` with reactive types.
|
||||
See xref:web/webmvc/mvc-ann-async.adoc[Asynchronous Requests] and xref:web/webmvc/mvc-ann-async.adoc#mvc-ann-async-reactive-types[Reactive Types] for more details.
|
||||
|
||||
@@ -33,14 +33,14 @@ Kotlin::
|
||||
======
|
||||
|
||||
The body will usually be provided as a value object to be rendered to a corresponding
|
||||
response representation (e.g. JSON) by one of the registered `HttpMessageConverters`.
|
||||
response representation (for example, JSON) by one of the registered `HttpMessageConverters`.
|
||||
|
||||
A `ResponseEntity<Resource>` can be returned for file content, copying the `InputStream`
|
||||
content of the provided resource to the response `OutputStream`. Note that the
|
||||
`InputStream` should be lazily retrieved by the `Resource` handle in order to reliably
|
||||
close it after it has been copied to the response. If you are using `InputStreamResource`
|
||||
for such a purpose, make sure to construct it with an on-demand `InputStreamSource`
|
||||
(e.g. through a lambda expression that retrieves the actual `InputStream`). Also, custom
|
||||
(for example, through a lambda expression that retrieves the actual `InputStream`). Also, custom
|
||||
subclasses of `InputStreamResource` are only supported in combination with a custom
|
||||
`contentLength()` implementation which avoids consuming the stream for that purpose.
|
||||
|
||||
|
||||
@@ -93,9 +93,9 @@ supported for all return values.
|
||||
`ResponseEntity`. See xref:web/webmvc/mvc-ann-async.adoc[Asynchronous Requests] and xref:web/webmvc/mvc-ann-async.adoc#mvc-ann-async-http-streaming[HTTP Streaming].
|
||||
|
||||
| Reactor and other reactive types registered via `ReactiveAdapterRegistry`
|
||||
| A single value type, e.g. `Mono`, is comparable to returning `DeferredResult`.
|
||||
A multi-value type, e.g. `Flux`, may be treated as a stream depending on the requested
|
||||
media type, e.g. "text/event-stream", "application/json+stream", or otherwise is
|
||||
| A single value type, for example, `Mono`, is comparable to returning `DeferredResult`.
|
||||
A multi-value type, for example, `Flux`, may be treated as a stream depending on the requested
|
||||
media type, for example, "text/event-stream", "application/json+stream", or otherwise is
|
||||
collected to a List and rendered as a single value. See xref:web/webmvc/mvc-ann-async.adoc[Asynchronous Requests] and
|
||||
xref:web/webmvc/mvc-ann-async.adoc#mvc-ann-async-reactive-types[Reactive Types].
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ method intends to accept a null value as well, either declare your argument as `
|
||||
or mark it as `required=false` in the corresponding `@RequestParam`, etc. annotation. This is
|
||||
a best practice and the recommended solution for regressions encountered in a 5.3 upgrade.
|
||||
|
||||
Alternatively, you may specifically handle e.g. the resulting `MissingPathVariableException`
|
||||
Alternatively, you may specifically handle, for example, the resulting `MissingPathVariableException`
|
||||
in the case of a required `@PathVariable`. A null value after conversion will be treated like
|
||||
an empty original value, so the corresponding `Missing...Exception` variants will be thrown.
|
||||
====
|
||||
|
||||
@@ -105,7 +105,7 @@ default from version 6.0. See xref:web/webmvc/mvc-config/path-matching.adoc[MVC
|
||||
customizations of path matching options.
|
||||
|
||||
`PathPattern` supports the same pattern syntax as `AntPathMatcher`. In addition, it also
|
||||
supports the capturing pattern, e.g. `+{*spring}+`, for matching 0 or more path segments
|
||||
supports the capturing pattern, for example, `+{*spring}+`, for matching 0 or more path segments
|
||||
at the end of a path. `PathPattern` also restricts the use of `+**+` for matching multiple
|
||||
path segments such that it's only allowed at the end of a pattern. This eliminates many
|
||||
cases of ambiguity when choosing the best matching pattern for a given request.
|
||||
@@ -272,7 +272,7 @@ To completely disable the use of path extensions in versions prior to 5.3, set t
|
||||
* `favorPathExtension(false)`, see xref:web/webmvc/mvc-config/content-negotiation.adoc[ContentNegotiationConfigurer]
|
||||
|
||||
Having a way to request content types other than through the `"Accept"` header can still
|
||||
be useful, e.g. when typing a URL in a browser. A safe alternative to path extensions is
|
||||
be useful, for example, when typing a URL in a browser. A safe alternative to path extensions is
|
||||
to use the query parameter strategy. If you must use file extensions, consider restricting
|
||||
them to a list of explicitly registered extensions through the `mediaTypes` property of
|
||||
xref:web/webmvc/mvc-config/content-negotiation.adoc[ContentNegotiationConfigurer].
|
||||
|
||||
Reference in New Issue
Block a user