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
@@ -88,7 +88,7 @@ public class HandlerResult {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the type of the value returned from the handler -- e.g. the return
|
||||
* Return the type of the value returned from the handler -- for example, the return
|
||||
* type declared on a controller method's signature. Also see
|
||||
* {@link #getReturnTypeSource()} to obtain the underlying
|
||||
* {@link MethodParameter} for the return type.
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
*/
|
||||
public class ParameterContentTypeResolver implements RequestedContentTypeResolver {
|
||||
|
||||
/** Primary lookup for media types by key (e.g. "json" -> "application/json") */
|
||||
/** Primary lookup for media types by key (for example, "json" -> "application/json"). */
|
||||
private final Map<String, MediaType> mediaTypes = new ConcurrentHashMap<>(64);
|
||||
|
||||
private String parameterName = "format";
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.lang.Nullable;
|
||||
/**
|
||||
* Builder for a composite {@link RequestedContentTypeResolver} that delegates
|
||||
* to other resolvers each implementing a different strategy to determine the
|
||||
* requested content type -- e.g. Accept header, query parameter, or other.
|
||||
* requested content type -- for example, Accept header, query parameter, or other.
|
||||
*
|
||||
* <p>Use builder methods to add resolvers in the desired order. For a given
|
||||
* request he first resolver to return a list that is not empty and does not
|
||||
|
||||
@@ -75,7 +75,7 @@ public class CorsRegistration {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the HTTP methods to allow, e.g. {@code "GET"}, {@code "POST"}, etc.
|
||||
* Set the HTTP methods to allow, for example, {@code "GET"}, {@code "POST"}, etc.
|
||||
* The special value {@code "*"} allows all methods. By default,
|
||||
* "simple" methods {@code GET}, {@code HEAD}, and {@code POST}
|
||||
* are allowed.
|
||||
|
||||
@@ -43,11 +43,11 @@ import org.springframework.web.server.WebHandler;
|
||||
*
|
||||
* <p>To create a resource handler, use {@link #addResourceHandler(String...)}
|
||||
* providing the URL path patterns for which the handler should be invoked to
|
||||
* serve static resources (e.g. {@code "/resources/**"}).
|
||||
* serve static resources (for example, {@code "/resources/**"}).
|
||||
*
|
||||
* <p>Then use additional methods on the returned
|
||||
* {@link ResourceHandlerRegistration} to add one or more locations from which
|
||||
* to serve static content from (e.g. {{@code "/"},
|
||||
* to serve static content from (for example, {{@code "/"},
|
||||
* {@code "classpath:/META-INF/public-web-resources/"}}) or to specify a cache
|
||||
* period for served resources.
|
||||
*
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.springframework.web.reactive.result.view.script.ScriptTemplateViewRes
|
||||
* different template mechanisms.
|
||||
*
|
||||
* <p>In addition, you can also configure {@link #defaultViews(View...)
|
||||
* defaultViews} for rendering according to the requested content type, e.g.
|
||||
* defaultViews} for rendering according to the requested content type, for example,
|
||||
* JSON, XML, etc.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
@@ -123,7 +123,7 @@ public class ViewResolverRegistry {
|
||||
* best match for the requested content type.
|
||||
* <p>Use {@link HttpMessageWriterView
|
||||
* HttpMessageWriterView} to adapt and use any existing
|
||||
* {@code HttpMessageWriter} (e.g. JSON, XML) as a {@code View}.
|
||||
* {@code HttpMessageWriter} (for example, JSON, XML) as a {@code View}.
|
||||
*/
|
||||
public void defaultViews(View... defaultViews) {
|
||||
this.defaultViews.addAll(Arrays.asList(defaultViews));
|
||||
|
||||
@@ -116,7 +116,7 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware {
|
||||
if (applicationContext != null) {
|
||||
Assert.state(!applicationContext.containsBean("mvcContentNegotiationManager"),
|
||||
"The Java/XML config for Spring MVC and Spring WebFlux cannot both be enabled, " +
|
||||
"e.g. via @EnableWebMvc and @EnableWebFlux, in the same application.");
|
||||
"for example, via @EnableWebMvc and @EnableWebFlux, in the same application.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ public interface WebFluxConfigurer {
|
||||
/**
|
||||
* Configure view resolution for rendering responses with a view and a model,
|
||||
* where the view is typically an HTML template but could also be based on
|
||||
* an HTTP message writer (e.g. JSON, XML).
|
||||
* an HTTP message writer (for example, JSON, XML).
|
||||
* <p>The configured view resolvers will be used for both annotated
|
||||
* controllers and functional endpoints.
|
||||
*/
|
||||
|
||||
@@ -122,7 +122,7 @@ public abstract class BodyExtractors {
|
||||
/**
|
||||
* Extractor to read form data into {@code MultiValueMap<String, String>}.
|
||||
* <p>As of 5.1 this method can also be used on the client side to read form
|
||||
* data from a server response (e.g. OAuth).
|
||||
* data from a server response (for example, OAuth).
|
||||
* @return {@code BodyExtractor} for form data
|
||||
*/
|
||||
public static BodyExtractor<Mono<MultiValueMap<String, String>>, ReactiveHttpInputMessage> toFormData() {
|
||||
|
||||
@@ -291,7 +291,7 @@ public interface WebClient {
|
||||
/**
|
||||
* Configure the {@link ClientHttpConnector} to use. This is useful for
|
||||
* plugging in and/or customizing options of the underlying HTTP client
|
||||
* library (e.g. SSL).
|
||||
* library (for example, SSL).
|
||||
* <p>By default this is set to
|
||||
* {@link org.springframework.http.client.reactive.ReactorClientHttpConnector
|
||||
* ReactorClientHttpConnector}.
|
||||
@@ -388,14 +388,14 @@ public interface WebClient {
|
||||
|
||||
/**
|
||||
* Specify the URI for the request using a URI template and URI variables.
|
||||
* If a {@link UriBuilderFactory} was configured for the client (e.g.
|
||||
* If a {@link UriBuilderFactory} was configured for the client (for example,
|
||||
* with a base URI) it will be used to expand the URI template.
|
||||
*/
|
||||
S uri(String uri, Object... uriVariables);
|
||||
|
||||
/**
|
||||
* Specify the URI for the request using a URI template and URI variables.
|
||||
* If a {@link UriBuilderFactory} was configured for the client (e.g.
|
||||
* If a {@link UriBuilderFactory} was configured for the client (for example,
|
||||
* with a base URI) it will be used to expand the URI template.
|
||||
*/
|
||||
S uri(String uri, Map<String, ?> uriVariables);
|
||||
|
||||
@@ -263,7 +263,7 @@ public interface EntityResponse<T> extends ServerResponse {
|
||||
Builder<T> cacheControl(CacheControl cacheControl);
|
||||
|
||||
/**
|
||||
* Configure one or more request header names (e.g. "Accept-Language") to
|
||||
* Configure one or more request header names (for example, "Accept-Language") to
|
||||
* add to the "Vary" response header to inform clients that the response is
|
||||
* subject to content negotiation and variances based on the value of the
|
||||
* given request headers. The configured request header names are added only
|
||||
|
||||
@@ -214,7 +214,7 @@ public interface ServerRequest {
|
||||
/**
|
||||
* Bind to this request and return an instance of the given type.
|
||||
* @param bindType the type of class to bind this request to
|
||||
* @param dataBinderCustomizer used to customize the data binder, e.g. set
|
||||
* @param dataBinderCustomizer used to customize the data binder, for example, set
|
||||
* (dis)allowed fields
|
||||
* @param <T> the type to bind to
|
||||
* @return a mono containing either a constructed and bound instance of
|
||||
|
||||
@@ -339,7 +339,7 @@ public interface ServerResponse {
|
||||
B cacheControl(CacheControl cacheControl);
|
||||
|
||||
/**
|
||||
* Configure one or more request header names (e.g. "Accept-Language") to
|
||||
* Configure one or more request header names (for example, "Accept-Language") to
|
||||
* add to the "Vary" response header to inform clients that the response is
|
||||
* subject to content negotiation and variances based on the value of the
|
||||
* given request headers. The configured request header names are added only
|
||||
|
||||
@@ -38,8 +38,8 @@ import org.springframework.web.util.pattern.PathPatternParser;
|
||||
* Abstract base class for URL-mapped
|
||||
* {@link org.springframework.web.reactive.HandlerMapping} implementations.
|
||||
*
|
||||
* <p>Supports direct matches, e.g. a registered "/test" matches "/test", and
|
||||
* various path pattern matches, e.g. a registered "/t*" pattern matches
|
||||
* <p>Supports direct matches, for example, a registered "/test" matches "/test", and
|
||||
* various path pattern matches, for example, a registered "/t*" pattern matches
|
||||
* both "/test" and "/team", "/test/*" matches all paths under "/test",
|
||||
* "/test/**" matches all paths below "/test". For details, see the
|
||||
* {@link org.springframework.web.util.pattern.PathPattern} javadoc.
|
||||
@@ -119,8 +119,8 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping {
|
||||
|
||||
/**
|
||||
* Look up a handler instance for the given URL lookup path.
|
||||
* <p>Supports direct matches, e.g. a registered "/test" matches "/test",
|
||||
* and various path pattern matches, e.g. a registered "/t*" matches
|
||||
* <p>Supports direct matches, for example, a registered "/test" matches "/test",
|
||||
* and various path pattern matches, for example, a registered "/t*" matches
|
||||
* both "/test" and "/team". For details, see the PathPattern class.
|
||||
* @param lookupPath the URL the handler is mapped to
|
||||
* @param exchange the current exchange
|
||||
|
||||
@@ -41,8 +41,8 @@ import org.springframework.util.CollectionUtils;
|
||||
* <p>The syntax is {@code PATH=HANDLER_BEAN_NAME}. If the path doesn't begin
|
||||
* with a slash, one is prepended.
|
||||
*
|
||||
* <p>Supports direct matches, e.g. a registered "/test" matches "/test", and
|
||||
* various Ant-style pattern matches, e.g. a registered "/t*" pattern matches
|
||||
* <p>Supports direct matches, for example, a registered "/test" matches "/test", and
|
||||
* various Ant-style pattern matches, for example, a registered "/t*" pattern matches
|
||||
* both "/test" and "/team", "/test/*" matches all paths under "/test",
|
||||
* "/test/**" matches all paths below "/test". For details, see the
|
||||
* {@link org.springframework.web.util.pattern.PathPattern} javadoc.
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Abstract base class for filename suffix based {@link VersionStrategy}
|
||||
* implementations, e.g. "static/myresource-version.js"
|
||||
* implementations, for example, "static/myresource-version.js".
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Brian Clozel
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Abstract base class for {@link VersionStrategy} implementations that insert
|
||||
* a prefix into the URL path, e.g. "version/static/myresource.js".
|
||||
* a prefix into the URL path, for example, "version/static/myresource.js".
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Brian Clozel
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.util.StreamUtils;
|
||||
|
||||
/**
|
||||
* A {@code VersionStrategy} that calculates a Hex MD5 hash from the content
|
||||
* of the resource and appends it to the file name, e.g.
|
||||
* of the resource and appends it to the file name, for example,
|
||||
* {@code "styles/main-e36d2e05253c6c7085a91522ce43a0b4.css"}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
/**
|
||||
* A {@link ResourceTransformer} implementation that modifies links in a CSS
|
||||
* file to match the public URL paths that should be exposed to clients (e.g.
|
||||
* file to match the public URL paths that should be exposed to clients (for example,
|
||||
* with an MD5 content-based hash inserted in the URL).
|
||||
*
|
||||
* <p>The implementation looks for links in CSS {@code @import} statements and
|
||||
@@ -164,7 +164,7 @@ public class CssLinkResourceTransformer extends ResourceTransformerSupport {
|
||||
*/
|
||||
protected abstract static class AbstractLinkParser implements LinkParser {
|
||||
|
||||
/** Return the keyword to use to search for links, e.g. "@import", "url(" */
|
||||
/** Return the keyword to use to search for links, for example, "@import", "url(". */
|
||||
protected abstract String getKeyword();
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
/**
|
||||
* Resolver that delegates to the chain, and if a resource is found, it then
|
||||
* attempts to find an encoded (e.g. gzip, brotli) variant that is acceptable
|
||||
* attempts to find an encoded (for example, gzip, brotli) variant that is acceptable
|
||||
* based on the "Accept-Encoding" request header.
|
||||
*
|
||||
* <p>The list of supported {@link #setContentCodings(List) contentCodings} can
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.core.io.Resource;
|
||||
|
||||
/**
|
||||
* A {@code VersionStrategy} that relies on a fixed version applied as a request
|
||||
* path prefix, e.g. reduced SHA, version name, release date, etc.
|
||||
* path prefix, for example, reduced SHA, version name, release date, etc.
|
||||
*
|
||||
* <p>This is useful for example when {@link ContentVersionStrategy} cannot be
|
||||
* used such as when using JavaScript module loaders which are in charge of
|
||||
|
||||
@@ -58,7 +58,7 @@ public class LiteWebJarsResourceResolver extends AbstractResourceResolver {
|
||||
|
||||
/**
|
||||
* Create a {@code LiteWebJarsResourceResolver} with a custom {@code WebJarVersionLocator} instance,
|
||||
* e.g. with a custom cache implementation.
|
||||
* for example, with a custom cache implementation.
|
||||
*/
|
||||
public LiteWebJarsResourceResolver(WebJarVersionLocator webJarVersionLocator) {
|
||||
this.webJarVersionLocator = webJarVersionLocator;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class PathResourceResolver extends AbstractResourceResolver {
|
||||
/**
|
||||
* By default, when a Resource is found, the path of the resolved resource is
|
||||
* compared to ensure it's under the input location where it was found.
|
||||
* However sometimes that may not be the case, e.g. when
|
||||
* However sometimes that may not be the case, for example, when
|
||||
* {@link CssLinkResourceTransformer}
|
||||
* resolves public URLs of links it contains, the CSS file is the location
|
||||
* and the resources being resolved are css files, images, fonts and others
|
||||
|
||||
@@ -33,7 +33,7 @@ public interface ResourceTransformerChain {
|
||||
/**
|
||||
* Return the {@code ResourceResolverChain} that was used to resolve the
|
||||
* {@code Resource} being transformed. This may be needed for resolving
|
||||
* related resources, e.g. links to other resources.
|
||||
* related resources, for example, links to other resources.
|
||||
*/
|
||||
ResourceResolverChain getResolverChain();
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public abstract class ResourceTransformerSupport implements ResourceTransformer
|
||||
|
||||
/**
|
||||
* Configure a {@link ResourceUrlProvider} to use when resolving the public
|
||||
* URL of links in a transformed resource (e.g. import links in a CSS file).
|
||||
* URL of links in a transformed resource (for example, import links in a CSS file).
|
||||
* This is required only for links expressed as full paths and not for
|
||||
* relative links.
|
||||
* @param resourceUrlProvider the URL provider to use
|
||||
@@ -62,7 +62,7 @@ public abstract class ResourceTransformerSupport implements ResourceTransformer
|
||||
/**
|
||||
* A transformer can use this method when a resource being transformed
|
||||
* contains links to other resources. Such links need to be replaced with the
|
||||
* public facing link as determined by the resource resolver chain (e.g. the
|
||||
* public facing link as determined by the resource resolver chain (for example, the
|
||||
* public URL may have a version inserted).
|
||||
* @param resourcePath the path to a resource that needs to be re-written
|
||||
* @param exchange the current exchange
|
||||
|
||||
@@ -61,7 +61,7 @@ import org.springframework.web.util.pattern.PathPattern;
|
||||
* <p>The {@linkplain #setLocations "locations"} property takes a list of Spring
|
||||
* {@link Resource} locations from which static resources are allowed to
|
||||
* be served by this handler. Resources could be served from a classpath location,
|
||||
* e.g. "classpath:/META-INF/public-web-resources/", allowing convenient packaging
|
||||
* for example, "classpath:/META-INF/public-web-resources/", allowing convenient packaging
|
||||
* and serving of resources such as .js, .css, and others in jar files.
|
||||
*
|
||||
* <p>This request handler may also be configured with a
|
||||
|
||||
@@ -43,7 +43,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
/**
|
||||
* Resolves request paths containing a version string that can be used as part
|
||||
* of an HTTP caching strategy in which a resource is cached with a date in the
|
||||
* distant future (e.g. 1 year) and cached until the version, and therefore the
|
||||
* distant future (for example, 1 year) and cached until the version, and therefore the
|
||||
* URL, is changed.
|
||||
*
|
||||
* <p>Different versioning strategies exist, and this resolver must be configured
|
||||
@@ -93,7 +93,7 @@ public class VersionResourceResolver extends AbstractResourceResolver {
|
||||
|
||||
/**
|
||||
* Insert a content-based version in resource URLs that match the given path
|
||||
* patterns. The version is computed from the content of the file, e.g.
|
||||
* patterns. The version is computed from the content of the file, for example,
|
||||
* {@code "css/main-e36d2e05253c6c7085a91522ce43a0b4.css"}. This is a good
|
||||
* default strategy to use except when it cannot be, for example when using
|
||||
* JavaScript module loaders, use {@link #addFixedVersionStrategy} instead
|
||||
@@ -114,7 +114,7 @@ public class VersionResourceResolver extends AbstractResourceResolver {
|
||||
* content-based versions) when using JavaScript module loaders.
|
||||
* <p>The version may be a random number, the current date, or a value
|
||||
* fetched from a git commit sha, a property file, or environment variable
|
||||
* and set with SpEL expressions in the configuration (e.g. see {@code @Value}
|
||||
* and set with SpEL expressions in the configuration (for example, see {@code @Value}
|
||||
* in Java config).
|
||||
* <p>If not done already, variants of the given {@code pathPatterns}, prefixed with
|
||||
* the {@code version} will be also configured. For example, adding a {@code "/js/**"} path pattern
|
||||
|
||||
@@ -68,7 +68,7 @@ public class WebJarsResourceResolver extends AbstractResourceResolver {
|
||||
|
||||
/**
|
||||
* Create a {@code WebJarsResourceResolver} with a custom {@code WebJarAssetLocator} instance,
|
||||
* e.g. with a custom index.
|
||||
* for example, with a custom index.
|
||||
*/
|
||||
public WebJarsResourceResolver(WebJarAssetLocator webJarAssetLocator) {
|
||||
this.webJarAssetLocator = webJarAssetLocator;
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.web.reactive.result.condition;
|
||||
import org.springframework.http.MediaType;
|
||||
|
||||
/**
|
||||
* A contract for media type expressions (e.g. "text/plain", "!text/plain") as
|
||||
* A contract for media type expressions (for example, "text/plain", "!text/plain") as
|
||||
* defined in the {@code @RequestMapping} annotation for "consumes" and
|
||||
* "produces" conditions.
|
||||
*
|
||||
|
||||
@@ -49,7 +49,7 @@ public interface RequestCondition<T> {
|
||||
* multiple URL patterns may return a new instance only with those patterns
|
||||
* that match the request.
|
||||
* <p>For CORS pre-flight requests, conditions should match to the would-be,
|
||||
* actual request (e.g. URL pattern, query parameters, and the HTTP method
|
||||
* actual request (for example, URL pattern, query parameters, and the HTTP method
|
||||
* from the "Access-Control-Request-Method" header). If a condition cannot
|
||||
* be matched to a pre-flight request it should return an instance with
|
||||
* empty content thus not causing a failure to match.
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
/**
|
||||
* A holder for a {@link RequestCondition} useful when the type of the request
|
||||
* condition is not known ahead of time, e.g. custom condition. Since this
|
||||
* condition is not known ahead of time, for example, custom condition. Since this
|
||||
* class is also an implementation of {@code RequestCondition}, effectively it
|
||||
* decorates the held request condition and allows it to be combined and compared
|
||||
* with other request conditions in a type and null safe way.
|
||||
|
||||
@@ -63,7 +63,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
* {@link HandlerMethodArgumentResolver}.
|
||||
* <p>By default, the method invocation happens on the thread from which the
|
||||
* {@code Mono} was subscribed to, or in some cases the thread that emitted one
|
||||
* of the resolved arguments (e.g. when the request body needs to be decoded).
|
||||
* of the resolved arguments (for example, when the request body needs to be decoded).
|
||||
* To ensure a predictable thread for the underlying method's invocation,
|
||||
* a {@link Scheduler} can optionally be provided via
|
||||
* {@link #setInvocationScheduler(Scheduler)}.
|
||||
@@ -129,7 +129,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
|
||||
|
||||
/**
|
||||
* Set the ParameterNameDiscoverer for resolving parameter names when needed
|
||||
* (e.g. default request attribute name).
|
||||
* (for example, default request attribute name).
|
||||
* <p>Default is a {@link DefaultParameterNameDiscoverer}.
|
||||
*/
|
||||
public void setParameterNameDiscoverer(ParameterNameDiscoverer nameDiscoverer) {
|
||||
|
||||
@@ -73,7 +73,7 @@ public class SyncInvocableHandlerMethod extends HandlerMethod {
|
||||
|
||||
/**
|
||||
* Set the ParameterNameDiscoverer for resolving parameter names when needed
|
||||
* (e.g. default request attribute name).
|
||||
* (for example, default request attribute name).
|
||||
* <p>Default is a {@link DefaultParameterNameDiscoverer}.
|
||||
*/
|
||||
public void setParameterNameDiscoverer(ParameterNameDiscoverer nameDiscoverer) {
|
||||
|
||||
@@ -130,7 +130,7 @@ public abstract class AbstractMessageReaderArgumentResolver extends HandlerMetho
|
||||
* Read the body from a method argument with {@link HttpMessageReader}.
|
||||
* @param bodyParam represents the element type for the body
|
||||
* @param actualParam the actual method argument type; possibly different
|
||||
* from {@code bodyParam}, e.g. for an {@code HttpEntity} argument
|
||||
* from {@code bodyParam}, for example, for an {@code HttpEntity} argument
|
||||
* @param isBodyRequired true if the body is required
|
||||
* @param bindingContext the binding context to use
|
||||
* @param exchange the current exchange
|
||||
|
||||
@@ -84,7 +84,7 @@ public abstract class AbstractMessageWriterResultHandler extends HandlerResultHa
|
||||
* Constructor with an additional {@link ReactiveAdapterRegistry}.
|
||||
* @param messageWriters for serializing Objects to the response body stream
|
||||
* @param contentTypeResolver for resolving the requested content type
|
||||
* @param adapterRegistry for adapting other reactive types (e.g. rx.Observable,
|
||||
* @param adapterRegistry for adapting other reactive types (for example, rx.Observable,
|
||||
* rx.Single, etc.) to Flux or Mono
|
||||
*/
|
||||
protected AbstractMessageWriterResultHandler(List<HttpMessageWriter<?>> messageWriters,
|
||||
|
||||
@@ -349,7 +349,7 @@ public class RequestMappingHandlerAdapter
|
||||
}
|
||||
|
||||
// Any other than the original exception (or a cause) is unintended here,
|
||||
// probably an accident (e.g. failed assertion or the like).
|
||||
// probably an accident (for example, failed assertion or the like).
|
||||
if (!exceptions.contains(invocationEx) && logger.isWarnEnabled()) {
|
||||
logger.warn(exchange.getLogPrefix() + "Failure in @ExceptionHandler " + invocable, invocationEx);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
* Resolver for {@code @RequestPart} arguments where the named part is decoded
|
||||
* much like an {@code @RequestBody} argument but based on the content of an
|
||||
* individual part instead. The arguments may be wrapped with a reactive type
|
||||
* for a single value (e.g. Reactor {@code Mono}, RxJava {@code Single}).
|
||||
* for a single value (for example, Reactor {@code Mono}, RxJava {@code Single}).
|
||||
*
|
||||
* <p>This resolver also supports arguments of type {@link Part} which may be
|
||||
* wrapped with a reactive type for a single value or multiple values.
|
||||
|
||||
@@ -414,7 +414,7 @@ public abstract class ResponseEntityExceptionHandler implements MessageSourceAwa
|
||||
/**
|
||||
* Create the {@link ResponseEntity} to use from the given body, headers,
|
||||
* and statusCode. Subclasses can override this method to inspect and possibly
|
||||
* modify the body, headers, or statusCode, e.g. to re-create an instance of
|
||||
* modify the body, headers, or statusCode, for example, to re-create an instance of
|
||||
* {@link ProblemDetail} as an extension of {@link ProblemDetail}.
|
||||
* @param body the body to use for the response
|
||||
* @param headers the headers to use for the response
|
||||
|
||||
@@ -79,7 +79,7 @@ public abstract class AbstractUrlBasedView extends AbstractView implements Initi
|
||||
* @param locale the desired Locale that we're looking for
|
||||
* @return {@code false} if the resource exists
|
||||
* {@code false} if we know that it does not exist
|
||||
* @throws Exception if the resource exists but is invalid (e.g. could not be parsed)
|
||||
* @throws Exception if the resource exists but is invalid (for example, could not be parsed)
|
||||
*/
|
||||
public abstract boolean checkResourceExists(Locale locale) throws Exception;
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ public class BindStatus {
|
||||
* Create a new BindStatus instance, representing a field or object status.
|
||||
* @param requestContext the current RequestContext
|
||||
* @param path the bean and property path for which values and errors
|
||||
* will be resolved (e.g. "customer.address.street")
|
||||
* will be resolved (for example, "customer.address.street")
|
||||
* @param htmlEscape whether to HTML-escape error messages and string values
|
||||
* @throws IllegalStateException if no corresponding Errors object found
|
||||
*/
|
||||
@@ -182,7 +182,7 @@ public class BindStatus {
|
||||
|
||||
/**
|
||||
* Return the bean and property path for which values and errors
|
||||
* will be resolved (e.g. "customer.address.street").
|
||||
* will be resolved (for example, "customer.address.street").
|
||||
*/
|
||||
public String getPath() {
|
||||
return this.path;
|
||||
@@ -191,7 +191,7 @@ public class BindStatus {
|
||||
/**
|
||||
* Return a bind expression that can be used in HTML forms as input name
|
||||
* for the respective field, or {@code null} if not field-specific.
|
||||
* <p>Returns a bind path appropriate for resubmission, e.g. "address.street".
|
||||
* <p>Returns a bind path appropriate for resubmission, for example, "address.street".
|
||||
* Note that the complete bind path as required by the bind tag is
|
||||
* "customer.address.street", if bound to a "customer" bean.
|
||||
*/
|
||||
@@ -289,7 +289,7 @@ public class BindStatus {
|
||||
/**
|
||||
* Return an error message string, concatenating all messages
|
||||
* separated by the given delimiter.
|
||||
* @param delimiter separator string, e.g. ", " or "<br>"
|
||||
* @param delimiter separator string, for example, ", " or "<br>"
|
||||
* @return the error message string
|
||||
*/
|
||||
public String getErrorMessagesAsString(String delimiter) {
|
||||
|
||||
@@ -333,7 +333,7 @@ public class RequestContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the given MessageSourceResolvable (e.g. an ObjectError instance), using the "defaultHtmlEscape" setting.
|
||||
* Retrieve the given MessageSourceResolvable (for example, an ObjectError instance), using the "defaultHtmlEscape" setting.
|
||||
* @param resolvable the MessageSourceResolvable
|
||||
* @return the message
|
||||
* @throws org.springframework.context.NoSuchMessageException if not found
|
||||
@@ -343,7 +343,7 @@ public class RequestContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the given MessageSourceResolvable (e.g. an ObjectError instance).
|
||||
* Retrieve the given MessageSourceResolvable (for example, an ObjectError instance).
|
||||
* @param resolvable the MessageSourceResolvable
|
||||
* @param htmlEscape if the message should be HTML-escaped
|
||||
* @return the message
|
||||
@@ -420,7 +420,7 @@ public class RequestContext {
|
||||
* Create a BindStatus for the given bind object using the
|
||||
* "defaultHtmlEscape" setting.
|
||||
* @param path the bean and property path for which values and errors will
|
||||
* be resolved (e.g. "person.age")
|
||||
* be resolved (for example, "person.age")
|
||||
* @return the new BindStatus instance
|
||||
* @throws IllegalStateException if no corresponding Errors object found
|
||||
*/
|
||||
@@ -432,7 +432,7 @@ public class RequestContext {
|
||||
* Create a BindStatus for the given bind object, using the
|
||||
* "defaultHtmlEscape" setting.
|
||||
* @param path the bean and property path for which values and errors will
|
||||
* be resolved (e.g. "person.age")
|
||||
* be resolved (for example, "person.age")
|
||||
* @param htmlEscape create a BindStatus with automatic HTML escaping?
|
||||
* @return the new BindStatus instance
|
||||
* @throws IllegalStateException if no corresponding Errors object found
|
||||
|
||||
@@ -49,7 +49,7 @@ import org.springframework.util.PatternMatchUtils;
|
||||
* "templates/test.ftl"
|
||||
*
|
||||
* <p>As a special feature, redirect URLs can be specified via the "redirect:"
|
||||
* prefix. E.g.: "redirect:myAction" will trigger a redirect to the given
|
||||
* prefix. For example: "redirect:myAction" will trigger a redirect to the given
|
||||
* URL, rather than resolution as standard view name. This is typically used
|
||||
* for redirecting to a controller URL after finishing a form workflow.
|
||||
*
|
||||
|
||||
@@ -78,14 +78,14 @@ import org.springframework.web.server.ServerWebExchange;
|
||||
*
|
||||
* <p>A String-based view name is resolved through the configured
|
||||
* {@link ViewResolver} instances into a {@link View} to use for rendering.
|
||||
* If a view is left unspecified (e.g. by returning {@code null} or a
|
||||
* If a view is left unspecified (for example, by returning {@code null} or a
|
||||
* model-related return value), a default view name is selected.
|
||||
*
|
||||
* <p>By default this resolver is ordered at {@link Ordered#LOWEST_PRECEDENCE}
|
||||
* and generally needs to be late in the order since it interprets any String
|
||||
* return value as a view name or any non-simple value type as a model attribute
|
||||
* while other result handlers may interpret the same otherwise based on the
|
||||
* presence of annotations, e.g. for {@code @ResponseBody}.
|
||||
* presence of annotations, for example, for {@code @ResponseBody}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
@@ -491,7 +491,7 @@ public class ViewResolutionResultHandler extends HandlerResultHandlerSupport imp
|
||||
boolean supports(ServerHttpRequest request);
|
||||
|
||||
/**
|
||||
* Update the response before streaming, e.g. to set the content-type.
|
||||
* Update the response before streaming, for example, to set the content-type.
|
||||
*/
|
||||
void updateResponse(ServerWebExchange exchange);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import org.springframework.util.Assert;
|
||||
* "freemarkerSettings", or "templateLoaderPath" properties.
|
||||
*
|
||||
* <p>The simplest way to use this class is to specify just a "templateLoaderPath"
|
||||
* (e.g. "classpath:templates"); you do not need any further configuration then.
|
||||
* (for example, "classpath:templates"); you do not need any further configuration then.
|
||||
*
|
||||
* <p>This bean must be included in the application context of any application
|
||||
* using {@link FreeMarkerView}. It exists purely to configure FreeMarker.
|
||||
|
||||
@@ -54,7 +54,7 @@ public final class CloseStatus {
|
||||
|
||||
/**
|
||||
* "1003 indicates that an endpoint is terminating the connection because it has
|
||||
* received a type of data it cannot accept (e.g., an endpoint that understands only
|
||||
* received a type of data it cannot accept (for example, an endpoint that understands only
|
||||
* text data MAY send this if it receives a binary message)."
|
||||
*/
|
||||
public static final CloseStatus NOT_ACCEPTABLE = new CloseStatus(1003);
|
||||
@@ -72,7 +72,7 @@ public final class CloseStatus {
|
||||
/**
|
||||
* "1006 is a reserved value and MUST NOT be set as a status code in a Close control
|
||||
* frame by an endpoint. It is designated for use in applications expecting a status
|
||||
* code to indicate that the connection was closed abnormally, e.g., without sending
|
||||
* code to indicate that the connection was closed abnormally, for example, without sending
|
||||
* or receiving a Close control frame."
|
||||
*/
|
||||
public static final CloseStatus NO_CLOSE_FRAME = new CloseStatus(1006);
|
||||
@@ -80,14 +80,14 @@ public final class CloseStatus {
|
||||
/**
|
||||
* "1007 indicates that an endpoint is terminating the connection because it has
|
||||
* received data within a message that was not consistent with the type of the message
|
||||
* (e.g., non-UTF-8 [RFC3629] data within a text message)."
|
||||
* (for example, non-UTF-8 [RFC3629] data within a text message)."
|
||||
*/
|
||||
public static final CloseStatus BAD_DATA = new CloseStatus(1007);
|
||||
|
||||
/**
|
||||
* "1008 indicates that an endpoint is terminating the connection because it has
|
||||
* received a message that violates its policy. This is a generic status code that can
|
||||
* be returned when there is no other more suitable status code (e.g., 1003 or 1009)
|
||||
* be returned when there is no other more suitable status code (for example, 1003 or 1009)
|
||||
* or if there is a need to hide specific details about the policy."
|
||||
*/
|
||||
public static final CloseStatus POLICY_VIOLATION = new CloseStatus(1008);
|
||||
@@ -131,7 +131,7 @@ public final class CloseStatus {
|
||||
* "1015 is a reserved value and MUST NOT be set as a status code in a Close control
|
||||
* frame by an endpoint. It is designated for use in applications expecting a status
|
||||
* code to indicate that the connection was closed due to a failure to perform a TLS
|
||||
* handshake (e.g., the server certificate can't be verified)."
|
||||
* handshake (for example, the server certificate can't be verified)."
|
||||
*/
|
||||
public static final CloseStatus TLS_HANDSHAKE_FAILURE = new CloseStatus(1015);
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ public class WebSocketMessage {
|
||||
|
||||
/**
|
||||
* Retain the data buffer for the message payload, which is useful on
|
||||
* runtimes (e.g. Netty) with pooled buffers. A shortcut for:
|
||||
* runtimes (for example, Netty) with pooled buffers. A shortcut for:
|
||||
* <pre>
|
||||
* DataBuffer payload = message.getPayload();
|
||||
* DataBufferUtils.retain(payload);
|
||||
@@ -143,7 +143,7 @@ public class WebSocketMessage {
|
||||
|
||||
/**
|
||||
* Release the payload {@code DataBuffer} which is useful on runtimes
|
||||
* (e.g. Netty) with pooled buffers such as Netty. A shortcut for:
|
||||
* (for example, Netty) with pooled buffers such as Netty. A shortcut for:
|
||||
* <pre>
|
||||
* DataBuffer payload = message.getPayload();
|
||||
* DataBufferUtils.release(payload);
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.springframework.web.reactive.socket.WebSocketSession;
|
||||
|
||||
/**
|
||||
* Base class for {@link WebSocketSession} implementations that bridge between
|
||||
* event-listener WebSocket APIs (e.g. Jakarta WebSocket API (JSR-356), Jetty,
|
||||
* event-listener WebSocket APIs (for example, Jakarta WebSocket API (JSR-356), Jetty,
|
||||
* Undertow) and Reactive Streams.
|
||||
*
|
||||
* <p>Also implements {@code Subscriber<Void>} so it can be used to subscribe to
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
* bind
|
||||
*
|
||||
* Exposes a BindStatus object for the given bind path, which can be
|
||||
* a bean (e.g. "person") to get global errors, or a bean property
|
||||
* (e.g. "person.name") to get field errors. Can be called multiple times
|
||||
* a bean (for example, "person") to get global errors, or a bean property
|
||||
* (for example, "person.name") to get field errors. Can be called multiple times
|
||||
* within a form to bind to multiple command objects and/or field names.
|
||||
*
|
||||
* This macro will participate in the default HTML escape setting for the given
|
||||
|
||||
Reference in New Issue
Block a user