Replace 'e.g.' with 'for example' in documentation and comments

Closes gh-33515
This commit is contained in:
Yanming Zhou
2024-09-26 14:03:46 +02:00
committed by Sam Brannen
parent e55fe9077f
commit 8941e2876e
722 changed files with 1290 additions and 1290 deletions

View File

@@ -64,7 +64,7 @@ this `Map`.
You can also extend `ProblemDetail` to add dedicated non-standard properties.
The copy constructor in `ProblemDetail` allows a subclass to make it easy to be created
from an existing `ProblemDetail`. This could be done centrally, e.g. from an
from an existing `ProblemDetail`. This could be done centrally, for example, from an
`@ControllerAdvice` such as `ResponseEntityExceptionHandler` that re-creates the
`ProblemDetail` of an exception into a subclass with the additional non-standard fields.
@@ -107,7 +107,7 @@ Message codes and arguments for each error are also resolved via `MessageSource`
| `MissingRequestValueException`
| (default)
| `+{0}+` a label for the value (e.g. "request header", "cookie value", ...), `+{1}+` the value name
| `+{0}+` a label for the value (for example, "request header", "cookie value", ...), `+{1}+` the value name
| `NotAcceptableStatusException`
| (default)

View File

@@ -657,7 +657,7 @@ include the version of the jar and can also match against incoming URLs without
-- for example, from `/webjars/jquery/jquery.min.js` to `/webjars/jquery/1.2.0/jquery.min.js`.
TIP: The Java configuration based on `ResourceHandlerRegistry` provides further options
for fine-grained control, e.g. last-modified behavior and optimized resource resolution.
for fine-grained control, for example, last-modified behavior and optimized resource resolution.

View File

@@ -82,10 +82,10 @@ 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`.
WebFlux, unlike Spring MVC, supports reactive types in the model, e.g. `Mono<Account>`.
WebFlux, unlike Spring MVC, supports reactive types in the model, for example, `Mono<Account>`.
You can declare a `@ModelAttribute` argument with or without a reactive type wrapper, and
it will be resolved accordingly to the actual value.

View File

@@ -343,7 +343,7 @@ You can declare a shared `produces` attribute at the class level. Unlike most ot
mapping attributes, however, when used at the class level, a method-level `produces` attribute
overrides rather than extend the class level declaration.
TIP: `MediaType` provides constants for commonly used media types -- e.g.
TIP: `MediaType` provides constants for commonly used media types -- for example,
`APPLICATION_JSON_VALUE`, `APPLICATION_XML_VALUE`.

View File

@@ -170,7 +170,7 @@ A `HandlerAdapter` may expose its exception handling mechanism as a
A `HandlerAdapter` may also choose to implement `DispatchExceptionHandler`. In that case
`DispatcherHandler` will apply it to exceptions that arise before a handler is mapped,
e.g. during handler mapping, or earlier, e.g. in a `WebFilter`.
for example, during handler mapping, or earlier, for example, in a `WebFilter`.
See also xref:web/webflux/controller/ann-exceptions.adoc[Exceptions] in the "`Annotated Controller`" section or
xref:web/webflux/reactive-spring.adoc#webflux-exception-handler[Exceptions] in the WebHandler API section.

View File

@@ -468,7 +468,7 @@ to encode and decode HTTP message content.
* An `Encoder` can be wrapped with `EncoderHttpMessageWriter` to adapt it for use in a web
application, while a `Decoder` can be wrapped with `DecoderHttpMessageReader`.
* {spring-framework-api}/core/io/buffer/DataBuffer.html[`DataBuffer`] abstracts different
byte buffer representations (e.g. Netty `ByteBuf`, `java.nio.ByteBuffer`, etc.) and is
byte buffer representations (for example, Netty `ByteBuf`, `java.nio.ByteBuffer`, etc.) and is
what all codecs work on. See xref:core/databuffer-codec.adoc[Data Buffers and Codecs] in the
"Spring Core" section for more on this topic.
@@ -493,8 +493,8 @@ The `Jackson2Decoder` works as follows:
* Jackson's asynchronous, non-blocking parser is used to aggregate a stream of byte chunks
into ``TokenBuffer``'s each representing a JSON object.
* Each `TokenBuffer` is passed to Jackson's `ObjectMapper` to create a higher level object.
* When decoding to a single-value publisher (e.g. `Mono`), there is one `TokenBuffer`.
* When decoding to a multi-value publisher (e.g. `Flux`), each `TokenBuffer` is passed to
* When decoding to a single-value publisher (for example, `Mono`), there is one `TokenBuffer`.
* When decoding to a multi-value publisher (for example, `Flux`), each `TokenBuffer` is passed to
the `ObjectMapper` as soon as enough bytes are received for a fully formed object. The
input content can be a JSON array, or any
https://en.wikipedia.org/wiki/JSON_streaming[line-delimited JSON] format such as NDJSON,
@@ -502,7 +502,7 @@ JSON Lines, or JSON Text Sequences.
The `Jackson2Encoder` works as follows:
* For a single value publisher (e.g. `Mono`), simply serialize it through the
* For a single value publisher (for example, `Mono`), simply serialize it through the
`ObjectMapper`.
* For a multi-value publisher with `application/json`, by default collect the values with
`Flux#collectToList()` and then serialize the resulting collection.