Streamline XML namespace support towards unversioned schemas
This commit also removes support code for outdated options which were only available in older schema versions. Issue: SPR-13499
This commit is contained in:
@@ -195,10 +195,6 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
|
||||
Boolean enableMatrixVariables = Boolean.valueOf(element.getAttribute("enable-matrix-variables"));
|
||||
handlerMappingDef.getPropertyValues().add("removeSemicolonContent", !enableMatrixVariables);
|
||||
}
|
||||
else if (element.hasAttribute("enableMatrixVariables")) {
|
||||
Boolean enableMatrixVariables = Boolean.valueOf(element.getAttribute("enableMatrixVariables"));
|
||||
handlerMappingDef.getPropertyValues().add("removeSemicolonContent", !enableMatrixVariables);
|
||||
}
|
||||
|
||||
configurePathMatchingProperties(handlerMappingDef, element, parserContext);
|
||||
readerContext.getRegistry().registerBeanDefinition(HANDLER_MAPPING_BEAN_NAME , handlerMappingDef);
|
||||
@@ -238,12 +234,6 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
|
||||
Boolean ignoreDefaultModel = Boolean.valueOf(element.getAttribute("ignore-default-model-on-redirect"));
|
||||
handlerAdapterDef.getPropertyValues().add("ignoreDefaultModelOnRedirect", ignoreDefaultModel);
|
||||
}
|
||||
else if (element.hasAttribute("ignoreDefaultModelOnRedirect")) {
|
||||
// "ignoreDefaultModelOnRedirect" spelling is deprecated
|
||||
Boolean ignoreDefaultModel = Boolean.valueOf(element.getAttribute("ignoreDefaultModelOnRedirect"));
|
||||
handlerAdapterDef.getPropertyValues().add("ignoreDefaultModelOnRedirect", ignoreDefaultModel);
|
||||
}
|
||||
|
||||
if (argumentResolvers != null) {
|
||||
handlerAdapterDef.getPropertyValues().add("customArgumentResolvers", argumentResolvers);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd=org/springframework/web/servlet/config/spring-mvc-3.0.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd=org/springframework/web/servlet/config/spring-mvc-3.1.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd=org/springframework/web/servlet/config/spring-mvc-3.2.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd=org/springframework/web/servlet/config/spring-mvc-4.0.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd=org/springframework/web/servlet/config/spring-mvc-4.1.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd=org/springframework/web/servlet/config/spring-mvc-4.2.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd=org/springframework/web/servlet/config/spring-mvc-4.3.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc.xsd=org/springframework/web/servlet/config/spring-mvc-4.3.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd=org/springframework/web/servlet/config/spring-mvc.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd=org/springframework/web/servlet/config/spring-mvc.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd=org/springframework/web/servlet/config/spring-mvc.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd=org/springframework/web/servlet/config/spring-mvc.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd=org/springframework/web/servlet/config/spring-mvc.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd=org/springframework/web/servlet/config/spring-mvc.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd=org/springframework/web/servlet/config/spring-mvc.xsd
|
||||
http\://www.springframework.org/schema/mvc/spring-mvc.xsd=org/springframework/web/servlet/config/spring-mvc.xsd
|
||||
|
||||
@@ -1,207 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<xsd:schema xmlns="http://www.springframework.org/schema/mvc"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:tool="http://www.springframework.org/schema/tool"
|
||||
targetNamespace="http://www.springframework.org/schema/mvc"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified">
|
||||
|
||||
<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" />
|
||||
<xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-3.0.xsd" />
|
||||
|
||||
<xsd:element name="annotation-driven">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"><![CDATA[
|
||||
Configures the annotation-driven Spring MVC Controller programming model.
|
||||
Note that, with Spring 3.0, this tag works in Servlet MVC only!
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="conversion-service" type="xsd:string">
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="java:org.springframework.core.convert.ConversionService" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="validator" type="xsd:string">
|
||||
<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.
|
||||
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:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="resources">
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<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/**"
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="location" use="required" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The resource location from which to serve static content, specified at a Spring Resource pattern.
|
||||
Each location must point to a valid directory. Multiple locations may be specified as a comma-separated list,
|
||||
and the locations will be checked for a given resource in the order specified. For example, a value of
|
||||
"/, classpath:/META-INF/public-web-resources/" will allow resources to be served both from the web app
|
||||
root and from any JAR on the classpath that contains a /META-INF/public-web-resources/ directory,
|
||||
with resources in the web app root taking precedence.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="cache-period" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
<![CDATA[
|
||||
Specifies the cache period for the resources served by this resource handler, in seconds.
|
||||
The default is to not send any cache headers but rather to rely on last-modified timestamps only.
|
||||
Set this to 0 in order to send cache headers that prevent caching, or to a positive number of
|
||||
seconds in order to send cache headers with the given max-age value.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="order" type="xsd:int">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
<![CDATA[
|
||||
Specifies the order of the HandlerMapping for the resource handler. The default order is Ordered.LOWEST_PRECEDENCE - 1.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="default-servlet-handler">
|
||||
<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.
|
||||
]]></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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="interceptors">
|
||||
<xsd:annotation>
|
||||
<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
|
||||
org.springframework.web.context.request.WebRequestInterceptor interface.
|
||||
The interceptors in this set are automatically configured on each registered HandlerMapping.
|
||||
The URI paths each interceptor applies to are configurable.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element ref="beans:bean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.web.servlet.handler.MappedInterceptor"><![CDATA[
|
||||
Registers an interceptor that intercepts every request regardless of its URI path.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="interceptor">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.web.servlet.handler.MappedInterceptor"><![CDATA[
|
||||
Registers an interceptor that interceptors requests sent to one or more URI paths.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="mapping" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="path" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A path into the application intercepted by this interceptor.
|
||||
Exact path mapping URIs (such as "/myPath") are supported as well as Ant-stype path patterns (such as /myPath/**).
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element ref="beans:bean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The interceptor's bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="view-controller">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation
|
||||
source="java:org.springframework.web.servlet.mvc.ParameterizableViewController"><![CDATA[
|
||||
Defines a simple Controller that selects a view to render the response.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="path" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The URL path the view is mapped to.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="view-name" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The name of the view to render. Optional.
|
||||
If not specified, the view name will be determined from the current HttpServletRequest
|
||||
by the DispatcherServlet's RequestToViewNameTranslator.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:schema>
|
||||
@@ -1,328 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<xsd:schema xmlns="http://www.springframework.org/schema/mvc"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:tool="http://www.springframework.org/schema/tool"
|
||||
targetNamespace="http://www.springframework.org/schema/mvc"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified">
|
||||
|
||||
<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.1.xsd" />
|
||||
<xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-3.1.xsd" />
|
||||
|
||||
<xsd:element name="annotation-driven">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"><![CDATA[
|
||||
Configures the annotation-driven Spring MVC Controller programming model.
|
||||
Note that, with Spring 3.0, this tag works in Servlet MVC only!
|
||||
|
||||
See org.springframework.web.servlet.config.annotation.EnableWebMvc Javadoc for
|
||||
information on code-based alternatives to enabling annotation-driven Spring MVC
|
||||
support.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:all minOccurs="0">
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The HttpMessageConverter bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="argument-resolvers" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Configures HandlerMethodArgumentResolver types to support custom controller method argument types.
|
||||
Using this option does not override the built-in support for resolving handler method arguments.
|
||||
To customize the built-in support for argument resolution configure RequestMappingHandlerAdapter directly.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The HandlerMethodArgumentResolver (or WebArgumentResolver for backwards compatibility) bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="return-value-handlers" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Configures HandlerMethodReturnValueHandler types to support custom controller method return value handling.
|
||||
Using this option does not override the built-in support for handling return values.
|
||||
To customize the built-in support for handling return values configure RequestMappingHandlerAdapter directly.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The HandlerMethodReturnValueHandler bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:all>
|
||||
<xsd:attribute name="conversion-service" type="xsd:string">
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="java:org.springframework.core.convert.ConversionService" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="validator" type="xsd:string">
|
||||
<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.
|
||||
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:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="message-codes-resolver" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The bean name of a MessageCodesResolver to use to build message codes from data binding and validation error codes.
|
||||
This attribute is not required.
|
||||
If not specified the DefaultMessageCodesResolver is used.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="java:org.springframework.validation.MessageCodesResolver" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="ignoreDefaultModelOnRedirect" type="xsd:boolean">
|
||||
<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.
|
||||
The default setting is false but new applications should consider setting it to true.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="resources">
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<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/**"
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="location" use="required" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The resource location from which to serve static content, specified at a Spring Resource pattern.
|
||||
Each location must point to a valid directory. Multiple locations may be specified as a comma-separated list,
|
||||
and the locations will be checked for a given resource in the order specified. For example, a value of
|
||||
"/, classpath:/META-INF/public-web-resources/" will allow resources to be served both from the web app
|
||||
root and from any JAR on the classpath that contains a /META-INF/public-web-resources/ directory,
|
||||
with resources in the web app root taking precedence.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="cache-period" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
<![CDATA[
|
||||
Specifies the cache period for the resources served by this resource handler, in seconds.
|
||||
The default is to not send any cache headers but rather to rely on last-modified timestamps only.
|
||||
Set this to 0 in order to send cache headers that prevent caching, or to a positive number of
|
||||
seconds in order to send cache headers with the given max-age value.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="order" type="xsd:int">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
<![CDATA[
|
||||
Specifies the order of the HandlerMapping for the resource handler. The default order is Ordered.LOWEST_PRECEDENCE - 1.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="default-servlet-handler">
|
||||
<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.
|
||||
]]></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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="interceptors">
|
||||
<xsd:annotation>
|
||||
<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
|
||||
org.springframework.web.context.request.WebRequestInterceptor interface.
|
||||
The interceptors in this set are automatically configured on each registered HandlerMapping.
|
||||
The URI paths each interceptor applies to are configurable.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:choice>
|
||||
<xsd:element ref="beans:bean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Registers an interceptor that intercepts every request regardless of its URI path..
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="beans:ref">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Registers an interceptor that intercepts every request regardless of its URI path..
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
<xsd:element name="interceptor">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.web.servlet.handler.MappedInterceptor"><![CDATA[
|
||||
Registers an interceptor that interceptors requests sent to one or more URI paths.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="mapping" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="path" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A path into the application intercepted by this interceptor.
|
||||
Exact path mapping URIs (such as "/myPath") are supported as well as Ant-stype path patterns (such as /myPath/**).
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:choice>
|
||||
<xsd:element ref="beans:bean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The interceptor's bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="beans:ref">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A reference to an interceptor bean.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="view-controller">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation
|
||||
source="java:org.springframework.web.servlet.mvc.ParameterizableViewController"><![CDATA[
|
||||
Defines a simple Controller that selects a view to render the response.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="path" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The URL path the view is mapped to.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="view-name" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The name of the view to render. Optional.
|
||||
If not specified, the view name will be determined from the current HttpServletRequest
|
||||
by the DispatcherServlet's RequestToViewNameTranslator.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:schema>
|
||||
@@ -1,502 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xsd:schema xmlns="http://www.springframework.org/schema/mvc"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:tool="http://www.springframework.org/schema/tool"
|
||||
targetNamespace="http://www.springframework.org/schema/mvc"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified">
|
||||
|
||||
<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.2.xsd"/>
|
||||
<xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-3.2.xsd"/>
|
||||
|
||||
<xsd:element name="annotation-driven">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"><![CDATA[
|
||||
Configures the annotation-driven Spring MVC Controller programming model.
|
||||
Note that this tag works in Web MVC only, not in Portlet MVC!
|
||||
|
||||
See org.springframework.web.servlet.config.annotation.EnableWebMvc javadoc for details
|
||||
on code-based alternatives to enabling annotation-driven Spring MVC support.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:all minOccurs="0">
|
||||
<xsd:element name="path-matching" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Configures the path matching part of the Spring MVC Controller programming model.
|
||||
Like annotation-driven, code-based alternatives are also documented in EnableWebMvc javadoc.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="suffix-pattern" type="xsd:boolean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Whether to use suffix pattern match (".*") when matching patterns to requests. If enabled
|
||||
a method mapped to "/users" also matches to "/users.*".
|
||||
The default value is true.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="trailing-slash" type="xsd:boolean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Whether to match to URLs irrespective of the presence of a trailing slash.
|
||||
If enabled a method mapped to "/users" also matches to "/users/".
|
||||
The default value is true.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="registered-suffixes-only" type="xsd:boolean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Whether suffix pattern matching should work only against path extensions
|
||||
explicitly registered when you configure content negotiation.
|
||||
This is generally recommended to reduce ambiguity and to
|
||||
avoid issues such as when a "." appears in the path for other reasons.
|
||||
The default value is false.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="path-helper" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The bean name of the UrlPathHelper to use for resolution of lookup paths.
|
||||
Use this to override the default UrlPathHelper with a custom subclass, or to share common UrlPathHelper settings across
|
||||
multiple HandlerMappings and MethodNameResolvers.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="path-matcher" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The bean name of the PathMatcher implementation to use for matching URL paths against registered URL patterns.
|
||||
Default is AntPathMatcher.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element ref="beans:bean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
An HttpMessageConverter bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="beans:ref">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A reference to an HttpMessageConverter bean.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="argument-resolvers" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Configures HandlerMethodArgumentResolver types to support custom controller method argument types.
|
||||
Using this option does not override the built-in support for resolving handler method arguments.
|
||||
To customize the built-in support for argument resolution configure RequestMappingHandlerAdapter directly.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The HandlerMethodArgumentResolver (or WebArgumentResolver for backwards compatibility) bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="return-value-handlers" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Configures HandlerMethodReturnValueHandler types to support custom controller method return value handling.
|
||||
Using this option does not override the built-in support for handling return values.
|
||||
To customize the built-in support for handling return values configure RequestMappingHandlerAdapter directly.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The HandlerMethodReturnValueHandler bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="async-support" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Configure options for asynchronous request processing.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:all minOccurs="0">
|
||||
<xsd:element name="callable-interceptors" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The ordered set of interceptors that intercept the lifecycle of concurrently executed
|
||||
requests, which start after a controller returns a java.util.concurrent.Callable.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Registers a CallableProcessingInterceptor.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="deferred-result-interceptors" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The ordered set of interceptors that intercept the lifecycle of concurrently executed
|
||||
requests, which start after a controller returns a DeferredResult.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Registers a DeferredResultProcessingInterceptor.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:all>
|
||||
<xsd:attribute name="task-executor" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.core.task.AsyncTaskExecutor"><![CDATA[
|
||||
The bean name of a default AsyncTaskExecutor to use when a controller method returns a {@link Callable}.
|
||||
Controller methods can override this default on a per-request basis by returning an AsyncTask.
|
||||
By default, a SimpleAsyncTaskExecutor is used which does not re-use threads and is not recommended for production.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="java:org.springframework.core.task.AsyncTaskExecutor" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="default-timeout" type="xsd:long">
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:all>
|
||||
<xsd:attribute name="conversion-service" type="xsd:string">
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="java:org.springframework.core.convert.ConversionService" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="validator" type="xsd:string">
|
||||
<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.
|
||||
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:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<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).
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="java:org.springframework.web.accept.ContentNegotiationManager" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="message-codes-resolver" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The bean name of a MessageCodesResolver to use to build message codes from data binding and validation error codes.
|
||||
This attribute is not required.
|
||||
If not specified the DefaultMessageCodesResolver is used.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="java:org.springframework.validation.MessageCodesResolver" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="enableMatrixVariables" type="xsd:boolean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Matrix variables can appear in any path segment, each matrix variable separated with a ";" (semicolon).
|
||||
For example "/cars;color=red;year=2012". By default, they're removed from the URL. If this property
|
||||
is set to true, matrix variables are not removed from the URL, and the request mapping pattern
|
||||
must use URI variable in path segments where matrix variables are expected. For example "/{cars}".
|
||||
Matrix variables can then be injected into a controller method with @MatrixVariable.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="ignoreDefaultModelOnRedirect" type="xsd:boolean">
|
||||
<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.
|
||||
The default setting is false but new applications should consider setting it to true.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="resources">
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<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/**"
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="location" use="required" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The resource location from which to serve static content, specified at a Spring Resource pattern.
|
||||
Each location must point to a valid directory. Multiple locations may be specified as a comma-separated list,
|
||||
and the locations will be checked for a given resource in the order specified. For example, a value of
|
||||
"/, classpath:/META-INF/public-web-resources/" will allow resources to be served both from the web app
|
||||
root and from any JAR on the classpath that contains a /META-INF/public-web-resources/ directory,
|
||||
with resources in the web app root taking precedence.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="cache-period" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
<![CDATA[
|
||||
Specifies the cache period for the resources served by this resource handler, in seconds.
|
||||
The default is to not send any cache headers but rather to rely on last-modified timestamps only.
|
||||
Set this to 0 in order to send cache headers that prevent caching, or to a positive number of
|
||||
seconds in order to send cache headers with the given max-age value.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="order" type="xsd:int">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
<![CDATA[
|
||||
Specifies the order of the HandlerMapping for the resource handler. The default order is Ordered.LOWEST_PRECEDENCE - 1.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="default-servlet-handler">
|
||||
<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.
|
||||
]]></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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="interceptors">
|
||||
<xsd:annotation>
|
||||
<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
|
||||
org.springframework.web.context.request.WebRequestInterceptor interface.
|
||||
The interceptors in this set are automatically configured on each registered HandlerMapping.
|
||||
The URI paths each interceptor applies to are configurable.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:choice>
|
||||
<xsd:element ref="beans:bean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Registers an interceptor that intercepts every request regardless of its URI path..
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="beans:ref">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Registers an interceptor that intercepts every request regardless of its URI path..
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
<xsd:element name="interceptor">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.web.servlet.handler.MappedInterceptor"><![CDATA[
|
||||
Registers an interceptor that interceptors requests sent to one or more URI paths.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="mapping" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="path" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A path into the application intercepted by this interceptor.
|
||||
Exact path mapping URIs (such as "/myPath") are supported as well as Ant-stype path patterns (such as /myPath/**).
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="exclude-mapping" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="path" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A path into the application that should not be intercepted by this interceptor.
|
||||
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:complexType>
|
||||
</xsd:element>
|
||||
<xsd:choice>
|
||||
<xsd:element ref="beans:bean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The interceptor's bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="beans:ref">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A reference to an interceptor bean.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="view-controller">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.web.servlet.mvc.ParameterizableViewController"><![CDATA[
|
||||
Map a simple (logic-less) view controller to a specific URL path (or pattern)
|
||||
in order to render a response with a pre-configured status code and view.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="path" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The URL path (or pattern) the controller is mapped to.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="view-name" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The name of the view to render. Optional.
|
||||
If not specified, the view name will be determined from the current HttpServletRequest
|
||||
by the DispatcherServlet's RequestToViewNameTranslator.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:schema>
|
||||
@@ -1,518 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<xsd:schema xmlns="http://www.springframework.org/schema/mvc"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:tool="http://www.springframework.org/schema/tool"
|
||||
targetNamespace="http://www.springframework.org/schema/mvc"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified">
|
||||
|
||||
<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-4.0.xsd"/>
|
||||
<xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-4.0.xsd"/>
|
||||
|
||||
<xsd:element name="annotation-driven">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"><![CDATA[
|
||||
Configures the annotation-driven Spring MVC Controller programming model.
|
||||
Note that this tag works in Web MVC only, not in Portlet MVC!
|
||||
|
||||
See org.springframework.web.servlet.config.annotation.EnableWebMvc javadoc for details
|
||||
on code-based alternatives to enabling annotation-driven Spring MVC support.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:all minOccurs="0">
|
||||
<xsd:element name="path-matching" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Configures the path matching part of the Spring MVC Controller programming model.
|
||||
Like annotation-driven, code-based alternatives are also documented in EnableWebMvc javadoc.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="suffix-pattern" type="xsd:boolean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Whether to use suffix pattern match (".*") when matching patterns to requests. If enabled
|
||||
a method mapped to "/users" also matches to "/users.*".
|
||||
The default value is true.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="trailing-slash" type="xsd:boolean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Whether to match to URLs irrespective of the presence of a trailing slash.
|
||||
If enabled a method mapped to "/users" also matches to "/users/".
|
||||
The default value is true.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="registered-suffixes-only" type="xsd:boolean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Whether to use suffix pattern match for registered file extensions only when matching patterns to requests.
|
||||
If enabled, a controller method mapped to "/users" also matches to "/users.json" assuming ".json" is a file extension registered with
|
||||
the provided ContentNegotiationManager. This can be useful for allowing only specific URL extensions to be used as well as in cases
|
||||
where a "." in the URL path can lead to ambiguous interpretation of path variable content, (e.g. given "/users/{user}" and incoming
|
||||
URLs such as "/users/john.j.joe" and "/users/john.j.joe.json").
|
||||
If enabled, this attribute also enables suffix-pattern. The default value is false.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="path-helper" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The bean name of the UrlPathHelper to use for resolution of lookup paths.
|
||||
Use this to override the default UrlPathHelper with a custom subclass, or to share common UrlPathHelper settings across
|
||||
multiple HandlerMappings and MethodNameResolvers.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="path-matcher" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The bean name of the PathMatcher implementation to use for matching URL paths against registered URL patterns.
|
||||
Default is AntPathMatcher.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element ref="beans:bean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
An HttpMessageConverter bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="beans:ref">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A reference to an HttpMessageConverter bean.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="argument-resolvers" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Configures HandlerMethodArgumentResolver types to support custom controller method argument types.
|
||||
Using this option does not override the built-in support for resolving handler method arguments.
|
||||
To customize the built-in support for argument resolution configure RequestMappingHandlerAdapter directly.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The HandlerMethodArgumentResolver (or WebArgumentResolver for backwards compatibility) bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="return-value-handlers" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Configures HandlerMethodReturnValueHandler types to support custom controller method return value handling.
|
||||
Using this option does not override the built-in support for handling return values.
|
||||
To customize the built-in support for handling return values configure RequestMappingHandlerAdapter directly.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The HandlerMethodReturnValueHandler bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="async-support" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Configure options for asynchronous request processing.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:all minOccurs="0">
|
||||
<xsd:element name="callable-interceptors" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The ordered set of interceptors that intercept the lifecycle of concurrently executed
|
||||
requests, which start after a controller returns a java.util.concurrent.Callable.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Registers a CallableProcessingInterceptor.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="deferred-result-interceptors" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The ordered set of interceptors that intercept the lifecycle of concurrently executed
|
||||
requests, which start after a controller returns a DeferredResult.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Registers a DeferredResultProcessingInterceptor.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:all>
|
||||
<xsd:attribute name="task-executor" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.core.task.AsyncTaskExecutor"><![CDATA[
|
||||
The bean name of a default AsyncTaskExecutor to use when a controller method returns a {@link Callable}.
|
||||
Controller methods can override this default on a per-request basis by returning an AsyncTask.
|
||||
By default, a SimpleAsyncTaskExecutor is used which does not re-use threads and is not recommended for production.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="java:org.springframework.core.task.AsyncTaskExecutor" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="default-timeout" type="xsd:long">
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:all>
|
||||
<xsd:attribute name="conversion-service" type="xsd:string">
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="java:org.springframework.core.convert.ConversionService" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="validator" type="xsd:string">
|
||||
<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.
|
||||
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:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<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).
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="java:org.springframework.web.accept.ContentNegotiationManager" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="message-codes-resolver" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The bean name of a MessageCodesResolver to use to build message codes from data binding and validation error codes.
|
||||
This attribute is not required.
|
||||
If not specified the DefaultMessageCodesResolver is used.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="java:org.springframework.validation.MessageCodesResolver" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="enable-matrix-variables" type="xsd:boolean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Matrix variables can appear in any path segment, each matrix variable separated with a ";" (semicolon).
|
||||
For example "/cars;color=red;year=2012". By default, they're removed from the URL. If this property
|
||||
is set to true, matrix variables are not removed from the URL, and the request mapping pattern
|
||||
must use URI variable in path segments where matrix variables are expected. For example "/{cars}".
|
||||
Matrix variables can then be injected into a controller method with @MatrixVariable.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="ignore-default-model-on-redirect" type="xsd:boolean">
|
||||
<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.
|
||||
The default setting is false but new applications should consider setting it to true.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="resources">
|
||||
<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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<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/**"
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="location" use="required" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The resource location from which to serve static content, specified at a Spring Resource pattern.
|
||||
Each location must point to a valid directory. Multiple locations may be specified as a comma-separated list,
|
||||
and the locations will be checked for a given resource in the order specified. For example, a value of
|
||||
"/, classpath:/META-INF/public-web-resources/" will allow resources to be served both from the web app
|
||||
root and from any JAR on the classpath that contains a /META-INF/public-web-resources/ directory,
|
||||
with resources in the web app root taking precedence.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="cache-period" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
<![CDATA[
|
||||
Specifies the cache period for the resources served by this resource handler, in seconds.
|
||||
The default is to not send any cache headers but rather to rely on last-modified timestamps only.
|
||||
Set this to 0 in order to send cache headers that prevent caching, or to a positive number of
|
||||
seconds in order to send cache headers with the given max-age value.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="order" type="xsd:token">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
<![CDATA[
|
||||
Specifies the order of the HandlerMapping for the resource handler. The default order is Ordered.LOWEST_PRECEDENCE - 1.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="default-servlet-handler">
|
||||
<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.
|
||||
]]></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.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="interceptors">
|
||||
<xsd:annotation>
|
||||
<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
|
||||
org.springframework.web.context.request.WebRequestInterceptor interface.
|
||||
The interceptors in this set are automatically configured on each registered HandlerMapping.
|
||||
The URI paths each interceptor applies to are configurable.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:choice>
|
||||
<xsd:element ref="beans:bean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Registers an interceptor that intercepts every request regardless of its URI path..
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="beans:ref">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Registers an interceptor that intercepts every request regardless of its URI path..
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
<xsd:element name="interceptor">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.web.servlet.handler.MappedInterceptor"><![CDATA[
|
||||
Registers an interceptor that interceptors requests sent to one or more URI paths.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="mapping" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="path" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A path into the application intercepted by this interceptor.
|
||||
Exact path mapping URIs (such as "/myPath") are supported as well as Ant-stype path patterns (such as /myPath/**).
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="exclude-mapping" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="path" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A path into the application that should not be intercepted by this interceptor.
|
||||
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:complexType>
|
||||
</xsd:element>
|
||||
<xsd:choice>
|
||||
<xsd:element ref="beans:bean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The interceptor's bean definition.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="beans:ref">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A reference to an interceptor bean.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="path-matcher" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.util.PathMatcher"><![CDATA[
|
||||
The bean name of a PathMatcher implementation to use with nested interceptors. This is an optional,
|
||||
advanced property required only if using custom PathMatcher implementations that support mapping
|
||||
metadata other than the Ant path patterns supported by default.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="java:org.springframework.util.PathMatcher" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="view-controller">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.web.servlet.mvc.ParameterizableViewController"><![CDATA[
|
||||
Map a simple (logic-less) view controller to a specific URL path (or pattern)
|
||||
in order to render a response with a pre-configured status code and view.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="path" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The URL path (or pattern) the controller is mapped to.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="view-name" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The name of the view to render. Optional.
|
||||
If not specified, the view name will be determined from the current HttpServletRequest
|
||||
by the DispatcherServlet's RequestToViewNameTranslator.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
</xsd:schema>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -8,8 +8,8 @@
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified">
|
||||
|
||||
<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-4.3.xsd"/>
|
||||
<xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-4.3.xsd"/>
|
||||
<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans.xsd"/>
|
||||
<xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool.xsd"/>
|
||||
|
||||
<xsd:element name="annotation-driven">
|
||||
<xsd:annotation>
|
||||
@@ -278,11 +278,6 @@ public class MvcNamespaceTests {
|
||||
doTestCustomValidator("mvc-config-custom-validator.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCustomValidator32() throws Exception {
|
||||
doTestCustomValidator("mvc-config-custom-validator-32.xml");
|
||||
}
|
||||
|
||||
private void doTestCustomValidator(String xml) throws Exception {
|
||||
loadBeanDefinitions(xml, 14);
|
||||
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
<bean id="kerry" class="org.springframework.tests.sample.beans.TestBean">
|
||||
<property name="name"><value>Kerry</value></property>
|
||||
<property name="age"><value>34</value></property>
|
||||
<property name="spouse"><ref local="rod"/></property>
|
||||
<property name="spouse"><ref bean="rod"/></property>
|
||||
</bean>
|
||||
|
||||
<bean id="typeMismatch" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
|
||||
<property name="name"><value>typeMismatch</value></property>
|
||||
<property name="age"><value>34x</value></property>
|
||||
<property name="spouse"><ref local="rod"/></property>
|
||||
<property name="spouse"><ref bean="rod"/></property>
|
||||
</bean>
|
||||
|
||||
<bean id="singletonFactory" class="org.springframework.tests.sample.beans.factory.DummyFactory">
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<bean id="kerryX" class="org.springframework.tests.sample.beans.TestBean">
|
||||
<property name="name"><value>Kerry</value></property>
|
||||
<property name="age"><value>34</value></property>
|
||||
<property name="spouse"><ref local="rod"/></property>
|
||||
<property name="spouse"><ref bean="rod"/></property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
|
||||
|
||||
<mvc:annotation-driven validator="validator"
|
||||
ignoreDefaultModelOnRedirect="true" enableMatrixVariables="true" />
|
||||
|
||||
<bean id="validator" class="org.springframework.web.servlet.config.MvcNamespaceTests$TestValidator" />
|
||||
|
||||
</beans>
|
||||
@@ -4,27 +4,27 @@
|
||||
<beans>
|
||||
|
||||
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
|
||||
<property name="defaultHandler"><ref local="starController"/></property>
|
||||
<property name="rootHandler"><ref local="mainController"/></property>
|
||||
<property name="defaultHandler"><ref bean="starController"/></property>
|
||||
<property name="rootHandler"><ref bean="mainController"/></property>
|
||||
<property name="useTrailingSlashMatch" value="true"/>
|
||||
<property name="urlMap">
|
||||
<map>
|
||||
<entry key="/welcome*"><ref local="otherController"/></entry>
|
||||
<entry key="/welcome.html"><ref local="mainController"/></entry>
|
||||
<entry key="/show.html"><ref local="mainController"/></entry>
|
||||
<entry key="/bookseats.html"><ref local="mainController"/></entry>
|
||||
<entry key="/reservation.html"><ref local="mainController"/></entry>
|
||||
<entry key="/payment.html"><ref local="mainController"/></entry>
|
||||
<entry key="/confirmation.html"><ref local="mainController"/></entry>
|
||||
<entry key="/welcome*"><ref bean="otherController"/></entry>
|
||||
<entry key="/welcome.html"><ref bean="mainController"/></entry>
|
||||
<entry key="/show.html"><ref bean="mainController"/></entry>
|
||||
<entry key="/bookseats.html"><ref bean="mainController"/></entry>
|
||||
<entry key="/reservation.html"><ref bean="mainController"/></entry>
|
||||
<entry key="/payment.html"><ref bean="mainController"/></entry>
|
||||
<entry key="/confirmation.html"><ref bean="mainController"/></entry>
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="urlMappingWithProps" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
|
||||
<property name="defaultHandler"><ref local="starController"/></property>
|
||||
<property name="rootHandler"><ref local="mainController"/></property>
|
||||
<property name="defaultHandler"><ref bean="starController"/></property>
|
||||
<property name="rootHandler"><ref bean="mainController"/></property>
|
||||
<property name="useTrailingSlashMatch" value="true"/>
|
||||
<property name="mappings"><ref local="propsForUrlMapping2"/></property>
|
||||
<property name="mappings"><ref bean="propsForUrlMapping2"/></property>
|
||||
</bean>
|
||||
|
||||
<bean id="propsForUrlMapping2" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
|
||||
|
||||
@@ -4,22 +4,22 @@
|
||||
<beans>
|
||||
|
||||
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
|
||||
<property name="defaultHandler"><ref local="starController"/></property>
|
||||
<property name="defaultHandler"><ref bean="starController"/></property>
|
||||
<property name="urlMap">
|
||||
<map>
|
||||
<entry key="/welcome.html"><ref local="mainController"/></entry>
|
||||
<entry key="/show.html"><ref local="mainController"/></entry>
|
||||
<entry key="/bookseats.html"><ref local="mainController"/></entry>
|
||||
<entry key="/welcome.html"><ref bean="mainController"/></entry>
|
||||
<entry key="/show.html"><ref bean="mainController"/></entry>
|
||||
<entry key="/bookseats.html"><ref bean="mainController"/></entry>
|
||||
<entry key="/reservation.html"><ref bean="mainControlle"/></entry>
|
||||
<entry key="/payment.html"><ref local="mainController"/></entry>
|
||||
<entry key="/confirmation.html"><ref local="mainController"/></entry>
|
||||
<entry key="/payment.html"><ref bean="mainController"/></entry>
|
||||
<entry key="/confirmation.html"><ref bean="mainController"/></entry>
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="urlMappingWithProps" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
|
||||
<property name="defaultHandler"><ref local="starController"/></property>
|
||||
<property name="mappings"><ref local="propsForUrlMapping2"/></property>
|
||||
<property name="defaultHandler"><ref bean="starController"/></property>
|
||||
<property name="mappings"><ref bean="propsForUrlMapping2"/></property>
|
||||
</bean>
|
||||
|
||||
<bean id="propsForUrlMapping2" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
|
||||
|
||||
Reference in New Issue
Block a user