Polishing
This commit is contained in:
@@ -1017,9 +1017,10 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value of the required {@code Host} header.
|
||||
* <p>If the header value does not contain a port, the returned
|
||||
* {@linkplain InetSocketAddress#getPort() port} will be {@code 0}.
|
||||
* Return the value of the {@code Host} header, if available.
|
||||
* <p>If the header value does not contain a port, the
|
||||
* {@linkplain InetSocketAddress#getPort() port} in the returned address will
|
||||
* be {@code 0}.
|
||||
* @since 5.0
|
||||
*/
|
||||
@Nullable
|
||||
|
||||
@@ -90,7 +90,7 @@ public interface ServerWebExchange {
|
||||
@SuppressWarnings("unchecked")
|
||||
default <T> T getRequiredAttribute(String name) {
|
||||
T value = getAttribute(name);
|
||||
Assert.notNull(value, () -> "Required attribute '" + name + "' is missing.");
|
||||
Assert.notNull(value, () -> "Required attribute '" + name + "' is missing");
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,6 @@ public interface ServerWebExchange {
|
||||
/**
|
||||
* Return the form data from the body of the request if the Content-Type is
|
||||
* {@code "application/x-www-form-urlencoded"} or an empty map otherwise.
|
||||
*
|
||||
* <p><strong>Note:</strong> calling this method causes the request body to
|
||||
* be read and parsed in full and the resulting {@code MultiValueMap} is
|
||||
* cached so that this method is safe to call more than once.
|
||||
@@ -134,7 +133,6 @@ public interface ServerWebExchange {
|
||||
/**
|
||||
* Return the parts of a multipart request if the Content-Type is
|
||||
* {@code "multipart/form-data"} or an empty map otherwise.
|
||||
*
|
||||
* <p><strong>Note:</strong> calling this method causes the request body to
|
||||
* be read and parsed in full and the resulting {@code MultiValueMap} is
|
||||
* cached so that this method is safe to call more than once.
|
||||
@@ -150,10 +148,9 @@ public interface ServerWebExchange {
|
||||
/**
|
||||
* Return the {@link ApplicationContext} associated with the web application,
|
||||
* if it was initialized with one via
|
||||
* {@link org.springframework.web.server.adapter.WebHttpHandlerBuilder#applicationContext
|
||||
* WebHttpHandlerBuilder#applicationContext}.
|
||||
* {@link org.springframework.web.server.adapter.WebHttpHandlerBuilder#applicationContext}.
|
||||
* @since 5.0.3
|
||||
* @see org.springframework.web.server.adapter.WebHttpHandlerBuilder#applicationContext(ApplicationContext)
|
||||
* @see org.springframework.web.server.adapter.WebHttpHandlerBuilder#applicationContext
|
||||
*/
|
||||
@Nullable
|
||||
ApplicationContext getApplicationContext();
|
||||
|
||||
Reference in New Issue
Block a user