Merge branch '5.3.x'

This commit is contained in:
Sam Brannen
2021-09-29 16:56:33 +02:00
74 changed files with 234 additions and 225 deletions

View File

@@ -1266,7 +1266,7 @@ public class DispatcherServlet extends FrameworkServlet {
}
/**
* No handler found -> set appropriate HTTP response status.
* No handler found → set appropriate HTTP response status.
* @param request current HTTP request
* @param response current HTTP response
* @throws Exception if preparing the response failed

View File

@@ -303,7 +303,7 @@ public class ModelAndView {
/**
* Add all attributes contained in the provided Map to the model.
* @param modelMap a Map of attributeName -> attributeValue pairs
* @param modelMap a Map of attributeName → attributeValue pairs
* @see ModelMap#addAllAttributes(Map)
* @see #getModelMap()
*/

View File

@@ -582,7 +582,7 @@ public abstract class RouterFunctions {
* <pre class="code">
* RouterFunction&lt;ServerResponse&gt; nestedRoute =
* RouterFunctions.route()
* .nest(RequestPredicates.path("/user"), () ->
* .nest(RequestPredicates.path("/user"), () -&gt;
* RouterFunctions.route()
* .GET(this::listUsers)
* .POST(this::createUser)
@@ -607,7 +607,7 @@ public abstract class RouterFunctions {
* <pre class="code">
* RouterFunction&lt;ServerResponse&gt; nestedRoute =
* RouterFunctions.route()
* .nest(RequestPredicates.path("/user"), builder ->
* .nest(RequestPredicates.path("/user"), builder -&gt;
* builder.GET(this::listUsers)
* .POST(this::createUser))
* .build();
@@ -652,7 +652,7 @@ public abstract class RouterFunctions {
* <pre class="code">
* RouterFunction&lt;ServerResponse&gt; nestedRoute =
* RouterFunctions.route()
* .path("/user", builder ->
* .path("/user", builder -&gt;
* builder.GET(this::listUsers)
* .POST(this::createUser))
* .build();
@@ -674,7 +674,7 @@ public abstract class RouterFunctions {
* RouterFunction&lt;ServerResponse&gt; filteredRoute =
* RouterFunctions.route()
* .GET("/user", this::listUsers)
* .filter((request, next) -> {
* .filter((request, next) -&gt; {
* // check for authentication headers
* if (isAuthenticated(request)) {
* return next.handle(request);
@@ -700,7 +700,7 @@ public abstract class RouterFunctions {
* RouterFunction&lt;ServerResponse&gt; filteredRoute =
* RouterFunctions.route()
* .GET("/user", this::listUsers)
* .before(request -> {
* .before(request -&gt; {
* log(request);
* return request;
* })
@@ -721,7 +721,7 @@ public abstract class RouterFunctions {
* RouterFunction&lt;ServerResponse&gt; filteredRoute =
* RouterFunctions.route()
* .GET("/user", this::listUsers)
* .after((request, response) -> {
* .after((request, response) -&gt; {
* log(response);
* return response;
* })
@@ -741,8 +741,8 @@ public abstract class RouterFunctions {
* RouterFunction&lt;ServerResponse&gt; filteredRoute =
* RouterFunctions.route()
* .GET("/user", this::listUsers)
* .onError(e -> e instanceof IllegalStateException,
* (e, request) -> ServerResponse.status(HttpStatus.INTERNAL_SERVER_ERROR).build())
* .onError(e -&gt; e instanceof IllegalStateException,
* (e, request) -&gt; ServerResponse.status(HttpStatus.INTERNAL_SERVER_ERROR).build())
* .build();
* </pre>
* @param predicate the type of exception to filter
@@ -762,7 +762,7 @@ public abstract class RouterFunctions {
* RouterFunctions.route()
* .GET("/user", this::listUsers)
* .onError(IllegalStateException.class,
* (e, request) -> ServerResponse.status(HttpStatus.INTERNAL_SERVER_ERROR).build())
* (e, request) -&gt; ServerResponse.status(HttpStatus.INTERNAL_SERVER_ERROR).build())
* .build();
* </pre>
* @param exceptionType the type of exception to filter

View File

@@ -259,7 +259,7 @@ public interface ServerRequest {
* public ServerResponse myHandleMethod(ServerRequest request) {
* Instant lastModified = // application-specific calculation
* return request.checkNotModified(lastModified)
* .orElseGet(() -> {
* .orElseGet(() -&gt; {
* // further request processing, actually building content
* return ServerResponse.ok().body(...);
* });
@@ -293,7 +293,7 @@ public interface ServerRequest {
* public ServerResponse myHandleMethod(ServerRequest request) {
* String eTag = // application-specific calculation
* return request.checkNotModified(eTag)
* .orElseGet(() -> {
* .orElseGet(() -&gt; {
* // further request processing, actually building content
* return ServerResponse.ok().body(...);
* });
@@ -330,7 +330,7 @@ public interface ServerRequest {
* Instant lastModified = // application-specific calculation
* String eTag = // application-specific calculation
* return request.checkNotModified(lastModified, eTag)
* .orElseGet(() -> {
* .orElseGet(() -&gt; {
* // further request processing, actually building content
* return ServerResponse.ok().body(...);
* });

View File

@@ -266,14 +266,14 @@ public interface ServerResponse {
* <p>For example:
* <pre class="code">
* public ServerResponse handleSse(ServerRequest request) {
* return ServerResponse.sse(sse -> sse.send("Hello World!"));
* return ServerResponse.sse(sse -&gt; sse.send("Hello World!"));
* }
* </pre>
*
* <p>or, to set both the id and event type:
* <pre class="code">
* public ServerResponse handleSse(ServerRequest request) {
* return ServerResponse.sse(sse -> sse
* return ServerResponse.sse(sse -&gt; sse
* .id("42)
* .event("event")
* .send("Hello World!"));
@@ -295,14 +295,14 @@ public interface ServerResponse {
* <p>For example:
* <pre class="code">
* public ServerResponse handleSse(ServerRequest request) {
* return ServerResponse.sse(sse -> sse.send("Hello World!"));
* return ServerResponse.sse(sse -&gt; sse.send("Hello World!"));
* }
* </pre>
*
* <p>or, to set both the id and event type:
* <pre class="code">
* public ServerResponse handleSse(ServerRequest request) {
* return ServerResponse.sse(sse -> sse
* return ServerResponse.sse(sse -&gt; sse
* .id("42)
* .event("event")
* .send("Hello World!"));

View File

@@ -60,7 +60,6 @@ import org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver;
* <p>This exception resolver is enabled by default in the common Spring
* {@link org.springframework.web.servlet.DispatcherServlet}.
*
* <p>
* <table>
* <caption>Supported Exceptions</caption>
* <thead>

View File

@@ -244,7 +244,7 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
* <ul>
* <li>seconds == -1 (default value): no generation cache-related headers</li>
* <li>seconds == 0: "Cache-Control: no-store" will prevent caching</li>
* <li>seconds > 0: "Cache-Control: max-age=seconds" will ask to cache content</li>
* <li>seconds &gt; 0: "Cache-Control: max-age=seconds" will ask to cache content</li>
* </ul>
* <p>For more specific needs, a custom {@link org.springframework.http.CacheControl}
* should be used.

View File

@@ -51,7 +51,7 @@ import org.springframework.web.util.WebUtils;
* &lt;/bean&gt;</pre>
*
* Every view name returned from a handler will be translated to a JSP
* resource (for example: "myView" -> "/WEB-INF/jsp/myView.jsp"), using
* resource (for example: "myView" &rarr; "/WEB-INF/jsp/myView.jsp"), using
* this view class by default.
*
* @author Rod Johnson

View File

@@ -47,7 +47,7 @@ import org.springframework.web.servlet.support.RequestContext;
* &lt;/bean&gt;</pre>
*
* Every view name returned from a handler will be translated to a JSP
* resource (for example: "myView" -> "/WEB-INF/jsp/myView.jsp"), using
* resource (for example: "myView" &rarr; "/WEB-INF/jsp/myView.jsp"), using
* this view class to enable explicit JSTL support.
*
* <p>The specified MessageSource loads messages from "messages.properties" etc

View File

@@ -49,7 +49,7 @@ import org.springframework.web.servlet.View;
* specified prefix and/or suffix. Exporting an attribute that holds the
* RequestContext to all views is explicitly supported.
*
* <p>Example: prefix="/WEB-INF/jsp/", suffix=".jsp", viewname="test" ->
* <p>Example: prefix="/WEB-INF/jsp/", suffix=".jsp", viewname="test" &rarr;
* "/WEB-INF/jsp/test.jsp"
*
* <p>As a special feature, redirect URLs can be specified via the "redirect:"
@@ -342,14 +342,16 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
}
/**
* Specify whether views resolved by this resolver should add path variables to the model or not.
* <p>>The default setting is to let each View decide (see {@link AbstractView#setExposePathVariables}.
* However, you can use this property to override that.
* Specify whether views resolved by this resolver should add path
* variables to the model or not.
* <p>The default setting is to let each View decide
* (see {@link AbstractView#setExposePathVariables}). However, you
* can use this property to override that.
* @param exposePathVariables
* <ul>
* <li>{@code true} - all Views resolved by this resolver will expose path variables
* <li>{@code false} - no Views resolved by this resolver will expose path variables
* <li>{@code null} - individual Views can decide for themselves (this is used by the default)
* <li>{@code null} - individual Views can decide for themselves (this is used by default)
* </ul>
* @see AbstractView#setExposePathVariables
*/

View File

@@ -28,7 +28,7 @@ import jakarta.servlet.http.HttpServletResponse;
* Abstract superclass for Atom Feed views, using the
* <a href="https://github.com/rometools/rome">ROME</a> package.
*
* <p>><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
* <p><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
* variant of ROME, version 1.5. Please upgrade your build dependency.</b>
*
* <p>Application-specific view classes will extend this class.

View File

@@ -32,7 +32,7 @@ import org.springframework.web.servlet.view.AbstractView;
* Abstract base class for Atom and RSS Feed views, using the
* <a href="https://github.com/rometools/rome">ROME</a> package.
*
* <p>><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
* <p><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
* variant of ROME, version 1.5. Please upgrade your build dependency.</b>
*
* <p>Application-specific view classes will typically extend from either

View File

@@ -30,7 +30,7 @@ import org.springframework.http.MediaType;
* Abstract superclass for RSS Feed views, using the
* <a href="https://github.com/rometools/rome">ROME</a> package.
*
* <p>><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
* <p><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
* variant of ROME, version 1.5. Please upgrade your build dependency.</b>
*
* <p>Application-specific view classes will extend this class.

View File

@@ -38,7 +38,7 @@ import org.springframework.util.Assert;
*
* <pre class="code">
* &lt;bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"&gt;
* &lt;property name="templateLoaderPath"&gt;&lt;value&gt;/WEB-INF/freemarker/&lt;/value>&lt;/property&gt;
* &lt;property name="templateLoaderPath"&gt;&lt;value&gt;/WEB-INF/freemarker/&lt;/value&gt;&lt;/property&gt;
* &lt;/bean&gt;</pre>
*
* This bean must be included in the application context of any application