1 <?xml version="1.0" encoding="UTF-8" ?>
2 <xsd:schema xmlns="http://www.springframework.org/schema/mvc"
3 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:beans="http://www.springframework.org/schema/beans"
4 xmlns:tool="http://www.springframework.org/schema/tool"
5 targetNamespace="http://www.springframework.org/schema/mvc"
6 elementFormDefault="qualified" attributeFormDefault="unqualified">
8 <xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" />
9 <xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-3.0.xsd" />
11 <xsd:element name="annotation-driven">
13 <xsd:documentation source="java:org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"><![CDATA[
14 Configures the annotation-driven Spring MVC Controller programming model.
15 Note that, with Spring 3.0, this tag works in Servlet MVC only!
16 ]]></xsd:documentation>
19 <xsd:attribute name="conversion-service" type="xsd:string">
21 <xsd:documentation source="java:org.springframework.core.convert.ConversionService"><![CDATA[
22 The bean name of the ConversionService that is to be used for type conversion during field binding.
23 This attribute is not required, and only needs to be specified explicitly if custom converters need to be configured.
24 If not specified, a default FormattingConversionService is registered that contains converters to/from standard JDK types.
25 In addition, full support for date/time formatting will be installed if the Joda Time library is present on the classpath.
26 ]]></xsd:documentation>
28 <tool:annotation kind="ref">
29 <tool:expected-type type="java:org.springframework.core.convert.ConversionService" />
34 <xsd:attribute name="validator" type="xsd:string">
36 <xsd:documentation source="java:org.springframework.validation.Validator"><![CDATA[
37 The bean name of the Validator that is to be used to validate Controller model objects.
38 This attribute is not required, and only needs to be specified explicitly if a custom Validator needs to be configured.
39 If not specified, JSR-303 validation will be installed if a JSR-303 provider is present on the classpath.
40 ]]></xsd:documentation>
42 <tool:annotation kind="ref">
43 <tool:expected-type type="java:org.springframework.validation.Validator" />
51 <xsd:element name="resources">
54 source="java:org.springframework.web.servlet.resource.ResourceHttpRequestHandler"><![CDATA[
55 Configures a handler for serving static resources such as images, js, and, css files with cache headers optimized for efficient
56 loading in a web browser. Allows resources to be served out of any path that is reachable via Spring's Resource handling.
57 ]]></xsd:documentation>
60 <xsd:attribute name="mapping" use="required" type="xsd:string">
62 <xsd:documentation><![CDATA[
63 The URL mapping pattern, within the current Servlet context, to use for serving resources from this handler, such as "/resources/**"
64 ]]></xsd:documentation>
67 <xsd:attribute name="location" use="required" type="xsd:string">
69 <xsd:documentation><![CDATA[
70 The resource location from which to serve static content, specified at a Spring Resource pattern.
71 Each location must point to a valid directory. Multiple locations may be specified as a comma-separated list,
72 and the locations will be checked for a given resource in the order specified. For example, a value of
73 "/, classpath:/META-INF/public-web-resources/" will allow resources to be served both from the web app
74 root and from any JAR on the classpath that contains a /META-INF/public-web-resources/ directory,
75 with resources in the web app root taking precedence.
76 ]]></xsd:documentation>
79 <xsd:attribute name="cache-period" type="xsd:string">
83 Specifies the cache period for the resources served by this resource handler, in seconds.
84 The default is to not send any cache headers but rather to rely on last-modified timestamps only.
85 Set this to 0 in order to send cache headers that prevent caching, or to a positive number of
86 seconds in order to send cache headers with the given max-age value.
87 ]]></xsd:documentation>
90 <xsd:attribute name="order" type="xsd:int">
94 Specifies the order of the HandlerMapping for the resource handler. The default order is Ordered.LOWEST_PRECEDENCE - 1.
95 ]]></xsd:documentation>
101 <xsd:element name="default-servlet-handler">
104 source="java:org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler"><![CDATA[
105 Configures a handler for serving static resources by forwarding to the Servlet container's default Servlet. Use of this
106 handler allows using a "/" mapping with the DispatcherServlet while still utilizing the Servlet container to serve static
108 ]]></xsd:documentation>
111 <xsd:attribute name="default-servlet-name" type="xsd:string">
113 <xsd:documentation><![CDATA[
114 The name of the default Servlet to forward to for static resource requests. The handler will try to auto-detect the container's
115 default Servlet at startup time using a list of known names. If the default Servlet cannot be detected because of using an unknown
116 container or because it has been manually configured, the servlet name must be set explicitly.
117 ]]></xsd:documentation>
123 <xsd:element name="interceptors">
125 <xsd:documentation><![CDATA[
126 The ordered set of interceptors that intercept HTTP Servlet Requests handled by Controllers.
127 Interceptors allow requests to be pre/post processed before/after handling.
128 Each inteceptor must implement the org.springframework.web.servlet.HandlerInterceptor or
129 org.springframework.web.context.request.WebRequestInterceptor interface.
130 The interceptors in this set are automatically configured on each registered HandlerMapping.
131 The URI paths each interceptor applies to are configurable.
132 ]]></xsd:documentation>
135 <xsd:choice maxOccurs="unbounded">
136 <xsd:element ref="beans:bean">
138 <xsd:documentation source="java:org.springframework.web.servlet.handler.MappedInterceptor"><![CDATA[
139 Registers an interceptor that intercepts every request regardless of its URI path.
140 ]]></xsd:documentation>
143 <xsd:element name="interceptor">
145 <xsd:documentation source="java:org.springframework.web.servlet.handler.MappedInterceptor"><![CDATA[
146 Registers an interceptor that interceptors requests sent to one or more URI paths.
147 ]]></xsd:documentation>
151 <xsd:element name="mapping" maxOccurs="unbounded">
153 <xsd:attribute name="path" type="xsd:string" use="required">
155 <xsd:documentation><![CDATA[
156 A path into the application intercepted by this interceptor.
157 Exact path mapping URIs (such as "/myPath") are supported as well as Ant-stype path patterns (such as /myPath/**).
158 ]]></xsd:documentation>
163 <xsd:element ref="beans:bean">
165 <xsd:documentation><![CDATA[
166 The interceptor's bean definition.
167 ]]></xsd:documentation>
177 <xsd:element name="view-controller">
180 source="java:org.springframework.web.servlet.mvc.ParameterizableViewController"><![CDATA[
181 Defines a simple Controller that selects a view to render the response.
182 ]]></xsd:documentation>
185 <xsd:attribute name="path" type="xsd:string" use="required">
187 <xsd:documentation><![CDATA[
188 The URL path the view is mapped to.
189 ]]></xsd:documentation>
192 <xsd:attribute name="view-name" type="xsd:string">
194 <xsd:documentation><![CDATA[
195 The name of the view to render. Optional.
196 If not specified, the view name will be determined from the current HttpServletRequest
197 by the DispatcherServlet's RequestToViewNameTranslator.
198 ]]></xsd:documentation>