Merge branch '5.2.x'
# Conflicts: # build.gradle
This commit is contained in:
@@ -71,9 +71,9 @@ public class CorsRegistration {
|
||||
|
||||
/**
|
||||
* Set the HTTP methods to allow, e.g. {@code "GET"}, {@code "POST"}, etc.
|
||||
* The special value {@code "*"} allows all methods.
|
||||
* <p>By default "simple" methods, i.e. {@code GET}, {@code HEAD}, and
|
||||
* {@code POST} are allowed.
|
||||
* <p>The special value {@code "*"} allows all methods.
|
||||
* <p>By default "simple" methods {@code GET}, {@code HEAD}, and {@code POST}
|
||||
* are allowed.
|
||||
*/
|
||||
public CorsRegistration allowedMethods(String... methods) {
|
||||
this.config.setAllowedMethods(Arrays.asList(methods));
|
||||
@@ -81,9 +81,9 @@ public class CorsRegistration {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the list of headers that a preflight request can list as allowed
|
||||
* for use during an actual request. The special value {@code "*"} may be
|
||||
* used to allow all headers.
|
||||
* Set the list of headers that a pre-flight request can list as allowed
|
||||
* for use during an actual request.
|
||||
* <p>The special value {@code "*"} may be used to allow all headers.
|
||||
* <p>A header name is not required to be listed if it is one of:
|
||||
* {@code Cache-Control}, {@code Content-Language}, {@code Expires},
|
||||
* {@code Last-Modified}, or {@code Pragma} as per the CORS spec.
|
||||
|
||||
@@ -39,10 +39,8 @@ public class CorsRegistry {
|
||||
|
||||
/**
|
||||
* Enable cross-origin request handling for the specified path pattern.
|
||||
*
|
||||
* <p>Exact path mapping URIs (such as {@code "/admin"}) are supported as
|
||||
* well as Ant-style path patterns (such as {@code "/admin/**"}).
|
||||
*
|
||||
* <p>By default, the {@code CorsConfiguration} for this mapping is
|
||||
* initialized with default values as described in
|
||||
* {@link CorsConfiguration#applyPermitDefaultValues()}.
|
||||
|
||||
@@ -160,7 +160,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
|
||||
|
||||
private List<HttpMessageConverter<?>> messageConverters;
|
||||
|
||||
private List<Object> requestResponseBodyAdvice = new ArrayList<>();
|
||||
private final List<Object> requestResponseBodyAdvice = new ArrayList<>();
|
||||
|
||||
@Nullable
|
||||
private WebBindingInitializer webBindingInitializer;
|
||||
@@ -643,7 +643,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
|
||||
* and custom resolvers provided via {@link #setCustomArgumentResolvers}.
|
||||
*/
|
||||
private List<HandlerMethodArgumentResolver> getDefaultArgumentResolvers() {
|
||||
List<HandlerMethodArgumentResolver> resolvers = new ArrayList<>();
|
||||
List<HandlerMethodArgumentResolver> resolvers = new ArrayList<>(30);
|
||||
|
||||
// Annotation-based argument resolution
|
||||
resolvers.add(new RequestParamMethodArgumentResolver(getBeanFactory(), false));
|
||||
@@ -690,7 +690,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
|
||||
* methods including built-in and custom resolvers.
|
||||
*/
|
||||
private List<HandlerMethodArgumentResolver> getDefaultInitBinderArgumentResolvers() {
|
||||
List<HandlerMethodArgumentResolver> resolvers = new ArrayList<>();
|
||||
List<HandlerMethodArgumentResolver> resolvers = new ArrayList<>(20);
|
||||
|
||||
// Annotation-based argument resolution
|
||||
resolvers.add(new RequestParamMethodArgumentResolver(getBeanFactory(), false));
|
||||
@@ -723,7 +723,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
|
||||
* custom handlers provided via {@link #setReturnValueHandlers}.
|
||||
*/
|
||||
private List<HandlerMethodReturnValueHandler> getDefaultReturnValueHandlers() {
|
||||
List<HandlerMethodReturnValueHandler> handlers = new ArrayList<>();
|
||||
List<HandlerMethodReturnValueHandler> handlers = new ArrayList<>(20);
|
||||
|
||||
// Single-purpose return value types
|
||||
handlers.add(new ModelAndViewMethodReturnValueHandler());
|
||||
|
||||
Reference in New Issue
Block a user