Polishing

This commit is contained in:
Juergen Hoeller 2015-07-29 12:40:35 +02:00
parent e1a0c50046
commit ff46cec58f
4 changed files with 109 additions and 110 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -103,8 +103,8 @@ public final class PatternsRequestCondition extends AbstractRequestCondition<Pat
List<String> fileExtensions) {
this.patterns = Collections.unmodifiableSet(prependLeadingSlash(patterns));
this.pathHelper = urlPathHelper != null ? urlPathHelper : new UrlPathHelper();
this.pathMatcher = pathMatcher != null ? pathMatcher : new AntPathMatcher();
this.pathHelper = (urlPathHelper != null ? urlPathHelper : new UrlPathHelper());
this.pathMatcher = (pathMatcher != null ? pathMatcher : new AntPathMatcher());
this.useSuffixPatternMatch = useSuffixPatternMatch;
this.useTrailingSlashMatch = useTrailingSlashMatch;
if (fileExtensions != null) {
@ -220,7 +220,6 @@ public final class PatternsRequestCondition extends AbstractRequestCondition<Pat
* {@link #getMatchingCondition(javax.servlet.http.HttpServletRequest)}.
* This method is provided as an alternative to be used if no request is available
* (e.g. introspection, tooling, etc).
*
* @param lookupPath the lookup path to match to existing patterns
* @return a collection of matching patterns sorted with the closest match at the top
*/

View File

@ -17,7 +17,6 @@
package org.springframework.web.servlet.mvc.method;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.http.HttpHeaders;
@ -39,13 +38,13 @@ import org.springframework.web.util.UrlPathHelper;
/**
* Encapsulates the following request mapping conditions:
* <ol>
* <li>{@link PatternsRequestCondition}
* <li>{@link RequestMethodsRequestCondition}
* <li>{@link ParamsRequestCondition}
* <li>{@link HeadersRequestCondition}
* <li>{@link ConsumesRequestCondition}
* <li>{@link ProducesRequestCondition}
* <li>{@code RequestCondition} (optional, custom request condition)
* <li>{@link PatternsRequestCondition}
* <li>{@link RequestMethodsRequestCondition}
* <li>{@link ParamsRequestCondition}
* <li>{@link HeadersRequestCondition}
* <li>{@link ConsumesRequestCondition}
* <li>{@link ProducesRequestCondition}
* <li>{@code RequestCondition} (optional, custom request condition)
* </ol>
*
* @author Arjen Poutsma
@ -297,21 +296,21 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (obj != null && obj instanceof RequestMappingInfo) {
RequestMappingInfo other = (RequestMappingInfo) obj;
return (this.patternsCondition.equals(other.patternsCondition) &&
this.methodsCondition.equals(other.methodsCondition) &&
this.paramsCondition.equals(other.paramsCondition) &&
this.headersCondition.equals(other.headersCondition) &&
this.consumesCondition.equals(other.consumesCondition) &&
this.producesCondition.equals(other.producesCondition) &&
this.customConditionHolder.equals(other.customConditionHolder));
if (!(other instanceof RequestMappingInfo)) {
return false;
}
return false;
RequestMappingInfo otherInfo = (RequestMappingInfo) other;
return (this.patternsCondition.equals(otherInfo.patternsCondition) &&
this.methodsCondition.equals(otherInfo.methodsCondition) &&
this.paramsCondition.equals(otherInfo.paramsCondition) &&
this.headersCondition.equals(otherInfo.headersCondition) &&
this.consumesCondition.equals(otherInfo.consumesCondition) &&
this.producesCondition.equals(otherInfo.producesCondition) &&
this.customConditionHolder.equals(otherInfo.customConditionHolder));
}
@Override
@ -348,6 +347,7 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
return builder.toString();
}
/**
* Create a new {@code RequestMappingInfo.Builder} with the given paths.
* @param paths the paths to use
@ -416,6 +416,7 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
RequestMappingInfo build();
}
private static class DefaultBuilder implements Builder {
private String[] paths;
@ -436,12 +437,10 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
private BuilderConfiguration options = new BuilderConfiguration();
public DefaultBuilder(String... paths) {
this.paths = paths;
}
@Override
public Builder paths(String... paths) {
this.paths = paths;
@ -498,7 +497,6 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
@Override
public RequestMappingInfo build() {
ContentNegotiationManager manager = this.options.getContentNegotiationManager();
PatternsRequestCondition patternsCondition = new PatternsRequestCondition(
@ -516,13 +514,13 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
}
}
/**
* Container for configuration options used for request mapping purposes.
* Such configuration is required to create RequestMappingInfo instances but
* is typically used across all RequestMappingInfo instances.
*
* @see Builder#options
* @since 4.2
* @see Builder#options
*/
public static class BuilderConfiguration {
@ -538,7 +536,6 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
private ContentNegotiationManager contentNegotiationManager;
/**
* Set a custom UrlPathHelper to use for the PatternsRequestCondition.
* <p>By default this is not set.

View File

@ -122,7 +122,6 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi
@Override
public void afterPropertiesSet() {
this.config = new RequestMappingInfo.BuilderConfiguration();
this.config.setPathHelper(getUrlPathHelper());
this.config.setPathMatcher(getPathMatcher());
@ -204,15 +203,13 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi
* Delegates to {@link #createRequestMappingInfo(RequestMapping, RequestCondition)},
* supplying the appropriate custom {@link RequestCondition} depending on whether
* the supplied {@code annotatedElement} is a class or method.
*
* @see #getCustomTypeCondition(Class)
* @see #getCustomMethodCondition(Method)
*/
private RequestMappingInfo createRequestMappingInfo(AnnotatedElement element) {
RequestMapping requestMapping = AnnotatedElementUtils.findMergedAnnotation(element, RequestMapping.class);
RequestCondition<?> condition = (element instanceof Class<?> ?
getCustomTypeCondition((Class<?>) element) :
getCustomMethodCondition((Method) element));
getCustomTypeCondition((Class<?>) element) : getCustomMethodCondition((Method) element));
return (requestMapping != null ? createRequestMappingInfo(requestMapping, condition) : null);
}
@ -252,8 +249,8 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi
* a directly declared annotation, a meta-annotation, or the synthesized
* result of merging annotation attributes within an annotation hierarchy.
*/
protected RequestMappingInfo createRequestMappingInfo(RequestMapping requestMapping,
RequestCondition<?> customCondition) {
protected RequestMappingInfo createRequestMappingInfo(
RequestMapping requestMapping, RequestCondition<?> customCondition) {
return RequestMappingInfo
.paths(resolveEmbeddedValuesInPatterns(requestMapping.path()))
@ -348,7 +345,7 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi
+ "or an empty string (\"\"); current value is [" + allowCredentials + "].");
}
if ((annotation.maxAge() >= 0) && (config.getMaxAge() == null)) {
if (annotation.maxAge() >= 0 && config.getMaxAge() == null) {
config.setMaxAge(annotation.maxAge());
}
}

View File

@ -13,7 +13,7 @@
<xsd:element name="annotation-driven">
<xsd:annotation>
<xsd:documentation source="java:org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"><![CDATA[
<xsd:documentation source="java:org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"><![CDATA[
Configures the annotation-driven Spring MVC Controller programming model.
Note that this tag works in Web MVC only, not in Portlet MVC!
@ -83,10 +83,10 @@
<xsd:element name="message-converters" minOccurs="0">
<xsd:annotation>
<xsd:documentation><![CDATA[
Configures one or more HttpMessageConverter types to use for converting @RequestBody method parameters and @ResponseBody method return values.
Using this configuration element is optional.
HttpMessageConverter registrations provided here will take precedence over HttpMessageConverter types registered by default.
Also see the register-defaults attribute if you want to turn off default registrations entirely.
Configures one or more HttpMessageConverter types to use for converting @RequestBody method parameters and
@ResponseBody method return values. Using this configuration element is optional.
HttpMessageConverter registrations provided here will take precedence over HttpMessageConverter types registered
by default. Also see the register-defaults attribute if you want to turn off default registrations entirely.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexType>
@ -111,7 +111,8 @@
<xsd:attribute name="register-defaults" type="xsd:boolean" default="true">
<xsd:annotation>
<xsd:documentation><![CDATA[
Whether or not default HttpMessageConverter registrations should be added in addition to the ones provided within this element.
Whether or not default HttpMessageConverter registrations should be added in addition to the ones provided
within this element.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
@ -141,7 +142,7 @@
]]></xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="java:org.springframework.web.method.support.HandlerMethodArgumentResolver" />
<tool:expected-type type="java:org.springframework.web.method.support.HandlerMethodArgumentResolver"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
@ -173,7 +174,7 @@
]]></xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="java:org.springframework.web.method.support.HandlerMethodReturnValueHandler" />
<tool:expected-type type="java:org.springframework.web.method.support.HandlerMethodReturnValueHandler"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
@ -237,7 +238,7 @@
]]></xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="java:org.springframework.core.task.AsyncTaskExecutor" />
<tool:expected-type type="java:org.springframework.core.task.AsyncTaskExecutor"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
@ -246,8 +247,9 @@
<xsd:annotation>
<xsd:documentation><![CDATA[
Specify the amount of time, in milliseconds, before asynchronous request handling times out.
In Servlet 3, the timeout begins after the main request processing thread has exited and ends when the request is dispatched again for further processing of the concurrently produced result.
If this value is not set, the default timeout of the underlying implementation is used, e.g. 10 seconds on Tomcat with Servlet 3.
In Servlet 3, the timeout begins after the main request processing thread has exited and ends when the request
is dispatched again for further processing of the concurrently produced result. If this value is not set,
the default timeout of the underlying implementation is used, e.g. 10 seconds on Tomcat with Servlet 3.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
@ -258,13 +260,12 @@
<xsd:annotation>
<xsd:documentation source="java:org.springframework.core.convert.ConversionService"><![CDATA[
The bean name of the ConversionService that is to be used for type conversion during field binding.
This attribute is not required, and only needs to be specified explicitly if custom converters need to be configured.
If not specified, a default FormattingConversionService is registered that contains converters to/from standard JDK types.
In addition, full support for date/time formatting will be installed if the Joda Time library is present on the classpath.
This attribute is not required, and only needs to be specified if custom converters need to be configured.
If not specified, a default FormattingConversionService is registered with converters to/from common value types.
]]></xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="java:org.springframework.core.convert.ConversionService" />
<tool:expected-type type="java:org.springframework.core.convert.ConversionService"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
@ -273,12 +274,12 @@
<xsd:annotation>
<xsd:documentation source="java:org.springframework.validation.Validator"><![CDATA[
The bean name of the Validator that is to be used to validate Controller model objects.
This attribute is not required, and only needs to be specified explicitly if a custom Validator needs to be configured.
This attribute is not required, and only needs to be specified if a custom Validator needs to be configured.
If not specified, JSR-303 validation will be installed if a JSR-303 provider is present on the classpath.
]]></xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="java:org.springframework.validation.Validator" />
<tool:expected-type type="java:org.springframework.validation.Validator"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
@ -286,15 +287,15 @@
<xsd:attribute name="content-negotiation-manager" type="xsd:string">
<xsd:annotation>
<xsd:documentation source="java:org.springframework.web.accept.ContentNegotiationManager"><![CDATA[
The bean name of a ContentNegotiationManager that is to be used to determine requested media types. If not specified,
a default ContentNegotiationManager is configured that checks the request path extension first and the "Accept" header
second where path extensions such as ".json", ".xml", ".atom", and ".rss" are recognized if Jackson, JAXB2, or the
Rome libraries are available. As a fallback option, the path extension is also used to perform a lookup through
the ServletContext and the Java Activation Framework (if available).
The bean name of a ContentNegotiationManager that is to be used to determine requested media types.
If not specified, a default ContentNegotiationManager is configured that checks the request path extension
first and the "Accept" header second where path extensions such as ".json", ".xml", ".atom", and ".rss" are
recognized if Jackson, JAXB2, or the Rome libraries are available. As a fallback option, the path extension
is also used to perform a lookup through the ServletContext and the Java Activation Framework (if available).
]]></xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="java:org.springframework.web.accept.ContentNegotiationManager" />
<tool:expected-type type="java:org.springframework.web.accept.ContentNegotiationManager"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
@ -308,7 +309,7 @@
]]></xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="java:org.springframework.validation.MessageCodesResolver" />
<tool:expected-type type="java:org.springframework.validation.MessageCodesResolver"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
@ -328,9 +329,10 @@
<xsd:annotation>
<xsd:documentation><![CDATA[
By default, the content of the "default" model is used both during rendering and redirect scenarios.
Alternatively a controller method can declare a RedirectAttributes argument and use it to provide attributes for a redirect.
Setting this flag to true ensures the "default" model is never used in a redirect scenario even if a RedirectAttributes argument is not declared.
Setting it to false means the "default" model may be used in a redirect if the controller method doesn't declare a RedirectAttributes argument.
Alternatively a controller method can declare a RedirectAttributes argument and use it to provide attributes
for a redirect. Setting this flag to true ensures the "default" model is never used in a redirect scenario
even if a RedirectAttributes argument is not declared. Setting it to false means the "default" model
may be used in a redirect if the controller method doesn't declare a RedirectAttributes argument.
The default setting is false but new applications should consider setting it to true.
]]></xsd:documentation>
</xsd:annotation>
@ -345,7 +347,7 @@
to the file name, e.g. "styles/main-e36d2e05253c6c7085a91522ce43a0b4.css".
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="patterns" type="xsd:string" use="required" />
<xsd:attribute name="patterns" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="fixed-version-strategy">
@ -355,8 +357,8 @@
e.g. reduced SHA, version name, release date, etc.
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="version" type="xsd:string" use="required" />
<xsd:attribute name="patterns" type="xsd:string" use="required" />
<xsd:attribute name="version" type="xsd:string" use="required"/>
<xsd:attribute name="patterns" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="resource-version-strategy">
@ -381,7 +383,7 @@
</xsd:annotation>
</xsd:element>
</xsd:choice>
<xsd:attribute name="patterns" type="xsd:string" use="required" />
<xsd:attribute name="patterns" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="version-resolver">
@ -393,9 +395,9 @@
]]></xsd:documentation>
</xsd:annotation>
<xsd:choice maxOccurs="unbounded">
<xsd:element type="content-version-strategy" name="content-version-strategy" />
<xsd:element type="fixed-version-strategy" name="fixed-version-strategy" />
<xsd:element type="resource-version-strategy" name="version-strategy" />
<xsd:element type="content-version-strategy" name="content-version-strategy"/>
<xsd:element type="fixed-version-strategy" name="fixed-version-strategy"/>
<xsd:element type="resource-version-strategy" name="version-strategy"/>
</xsd:choice>
</xsd:complexType>
@ -403,13 +405,13 @@
<xsd:annotation>
<xsd:documentation source="org.springframework.web.servlet.resource.ResourceResolver"><![CDATA[
A list of ResourceResolver beans definition and references.
A ResourceResolver provides mechanisms for resolving an incoming request to an actual Resource and for obtaining the public
URL path that clients should use when requesting the resource.
A ResourceResolver provides mechanisms for resolving an incoming request to an actual Resource and for
obtaining the public URL path that clients should use when requesting the resource.
]]></xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:choice maxOccurs="unbounded">
<xsd:element type="version-resolver" name="version-resolver" />
<xsd:element type="version-resolver" name="version-resolver"/>
<xsd:element ref="beans:bean">
<xsd:annotation>
<xsd:documentation source="org.springframework.web.servlet.resource.ResourceResolver"><![CDATA[
@ -590,8 +592,9 @@
<xsd:annotation>
<xsd:documentation
source="java:org.springframework.web.servlet.resource.ResourceHttpRequestHandler"><![CDATA[
Configures a handler for serving static resources such as images, js, and, css files with cache headers optimized for efficient
loading in a web browser. Allows resources to be served out of any path that is reachable via Spring's Resource handling.
Configures a handler for serving static resources such as images, js, and, css files with cache headers
optimized for efficient loading in a web browser. Allows resources to be served out of any path that is
reachable via Spring's Resource handling.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexType>
@ -602,7 +605,8 @@
<xsd:attribute name="mapping" use="required" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
The URL mapping pattern, within the current Servlet context, to use for serving resources from this handler, such as "/resources/**"
The URL mapping pattern within the current Servlet context to use for serving resources from this handler,
such as "/resources/**"
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
@ -633,7 +637,8 @@
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Specifies the order of the HandlerMapping for the resource handler. The default order is Ordered.LOWEST_PRECEDENCE - 1.
Specifies the order of the HandlerMapping for the resource handler.
The default order is Ordered.LOWEST_PRECEDENCE - 1.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
@ -644,22 +649,23 @@
<xsd:annotation>
<xsd:documentation
source="java:org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler"><![CDATA[
Configures a handler for serving static resources by forwarding to the Servlet container's default Servlet. Use of this
handler allows using a "/" mapping with the DispatcherServlet while still utilizing the Servlet container to serve static
resources.
This handler will forward all requests to the default Servlet. Therefore it is important that it remains last in the
order of all other URL HandlerMappings. That will be the case if you use the "annotation-driven" element or alternatively
if you are setting up your customized HandlerMapping instance be sure to set its "order" property to a value lower than
that of the DefaultServletHttpRequestHandler, which is Integer.MAX_VALUE.
Configures a handler for serving static resources by forwarding to the Servlet container's default Servlet.
Use of this handler allows using a "/" mapping with the DispatcherServlet while still utilizing the Servlet
container to serve static resources.
This handler will forward all requests to the default Servlet. Therefore it is important that it remains last
in the order of all other URL HandlerMappings. That will be the case if you use the "annotation-driven" element
or alternatively if you are setting up your customized HandlerMapping instance be sure to set its "order"
property to a value lower than that of the DefaultServletHttpRequestHandler, which is Integer.MAX_VALUE.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:attribute name="default-servlet-name" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
The name of the default Servlet to forward to for static resource requests. The handler will try to auto-detect the container's
default Servlet at startup time using a list of known names. If the default Servlet cannot be detected because of using an unknown
container or because it has been manually configured, the servlet name must be set explicitly.
The name of the default Servlet to forward to for static resource requests. The handler will try to
autodetect the container's default Servlet at startup time using a list of known names. If the default
Servlet cannot be detected because of using an unknown container or because it has been manually configured,
the servlet name must be set explicitly.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
@ -671,7 +677,7 @@
<xsd:documentation><![CDATA[
The ordered set of interceptors that intercept HTTP Servlet Requests handled by Controllers.
Interceptors allow requests to be pre/post processed before/after handling.
Each inteceptor must implement the org.springframework.web.servlet.HandlerInterceptor or
Each interceptor must implement the org.springframework.web.servlet.HandlerInterceptor or
org.springframework.web.context.request.WebRequestInterceptor interface.
The interceptors in this set are automatically detected by every registered HandlerMapping.
The URI paths each interceptor applies to are configurable.
@ -756,7 +762,7 @@
]]></xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="java:org.springframework.util.PathMatcher" />
<tool:expected-type type="java:org.springframework.util.PathMatcher"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
@ -947,7 +953,7 @@
]]></xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="java:java.lang.Class" />
<tool:expected-type type="java:java.lang.Class"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
@ -1285,67 +1291,67 @@
<xsd:element name="mapping" minOccurs="1" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation><![CDATA[
Enable cross origin requests processing on the specified path pattern.
By default, all origins, GET HEAD POST methods, all headers and credentials
are allowed and max age is set to 30 minutes.
Enable cross origin requests processing on the specified path pattern.
By default, all origins, GET HEAD POST methods, all headers and credentials
are allowed and max age is set to 30 minutes.
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:attribute name="path" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation><![CDATA[
A path into the application that should handle CORS requests.
Exact path mapping URIs (such as "/admin") are supported as well as Ant-stype path patterns (such as /admin/**).
A path into the application that should handle CORS requests.
Exact path mapping URIs (such as "/admin") are supported as well as Ant-stype path patterns (such as /admin/**).
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="allowed-origins" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
Comma-separated list of origins to allow, e.g. "http://domain1.com, http://domain2.com".
The special value "*" allows all domains (default).
Comma-separated list of origins to allow, e.g. "http://domain1.com, http://domain2.com".
The special value "*" allows all domains (default).
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="allowed-methods" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
Comma-separated list of HTTP methods to allow, e.g. "GET, POST".
The special value "*" allows all method.
By default GET, HEAD and POST methods are allowed.
Comma-separated list of HTTP methods to allow, e.g. "GET, POST".
The special value "*" allows all method.
By default GET, HEAD and POST methods are allowed.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="allowed-headers" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
Comma-separated list of headers that a pre-flight request can list as allowed for use during an actual request.
The special value of "*" allows actual requests to send any header (default).
Comma-separated list of headers that a pre-flight request can list as allowed for use during an actual request.
The special value of "*" allows actual requests to send any header (default).
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="exposed-headers" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
Comma-separated list of response headers other than simple headers (i.e.
Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma) that an
actual response might have and can be exposed.
Empty by default.
Comma-separated list of response headers other than simple headers (i.e.
Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma) that an
actual response might have and can be exposed.
Empty by default.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="allow-credentials" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation><![CDATA[
Whether user credentials are supported (true by default).
Whether user credentials are supported (true by default).
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="max-age" type="xsd:long">
<xsd:annotation>
<xsd:documentation><![CDATA[
How long, in seconds, the response from a pre-flight request can be cached by clients.
1800 seconds (30 minutes) by default.
How long, in seconds, the response from a pre-flight request can be cached by clients.
1800 seconds (30 minutes) by default.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>