-1506862284.cache 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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"
  4. xmlns:beans="http://www.springframework.org/schema/beans"
  5. xmlns:tool="http://www.springframework.org/schema/tool"
  6. targetNamespace="http://www.springframework.org/schema/mvc"
  7. elementFormDefault="qualified"
  8. attributeFormDefault="unqualified">
  9. <xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.1.xsd" />
  10. <xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-3.1.xsd" />
  11. <xsd:element name="annotation-driven">
  12. <xsd:annotation>
  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. See org.springframework.web.servlet.config.annotation.EnableWebMvc Javadoc for
  17. information on code-based alternatives to enabling annotation-driven Spring MVC
  18. support.
  19. ]]></xsd:documentation>
  20. </xsd:annotation>
  21. <xsd:complexType>
  22. <xsd:all minOccurs="0">
  23. <xsd:element name="message-converters" minOccurs="0">
  24. <xsd:annotation>
  25. <xsd:documentation><![CDATA[
  26. Configures one or more HttpMessageConverter types to use for converting @RequestBody method parameters and @ResponseBody method return values.
  27. Using this configuration element is optional.
  28. HttpMessageConverter registrations provided here will take precedence over HttpMessageConverter types registered by default.
  29. Also see the register-defaults attribute if you want to turn off default registrations entirely.
  30. ]]></xsd:documentation>
  31. </xsd:annotation>
  32. <xsd:complexType>
  33. <xsd:sequence>
  34. <xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
  35. <xsd:annotation>
  36. <xsd:documentation><![CDATA[
  37. The HttpMessageConverter bean definition.
  38. ]]></xsd:documentation>
  39. </xsd:annotation>
  40. </xsd:element>
  41. </xsd:sequence>
  42. <xsd:attribute name="register-defaults" type="xsd:boolean" default="true">
  43. <xsd:annotation>
  44. <xsd:documentation><![CDATA[
  45. Whether or not default HttpMessageConverter registrations should be added in addition to the ones provided within this element.
  46. ]]></xsd:documentation>
  47. </xsd:annotation>
  48. </xsd:attribute>
  49. </xsd:complexType>
  50. </xsd:element>
  51. <xsd:element name="argument-resolvers" minOccurs="0">
  52. <xsd:annotation>
  53. <xsd:documentation><![CDATA[
  54. Configures HandlerMethodArgumentResolver types to support custom controller method argument types.
  55. Using this option does not override the built-in support for resolving handler method arguments.
  56. To customize the built-in support for argument resolution configure RequestMappingHandlerAdapter directly.
  57. ]]></xsd:documentation>
  58. </xsd:annotation>
  59. <xsd:complexType>
  60. <xsd:sequence>
  61. <xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
  62. <xsd:annotation>
  63. <xsd:documentation><![CDATA[
  64. The HandlerMethodArgumentResolver (or WebArgumentResolver for backwards compatibility) bean definition.
  65. ]]></xsd:documentation>
  66. </xsd:annotation>
  67. </xsd:element>
  68. </xsd:sequence>
  69. </xsd:complexType>
  70. </xsd:element>
  71. <xsd:element name="return-value-handlers" minOccurs="0">
  72. <xsd:annotation>
  73. <xsd:documentation><![CDATA[
  74. Configures HandlerMethodReturnValueHandler types to support custom controller method return value handling.
  75. Using this option does not override the built-in support for handling return values.
  76. To customize the built-in support for handling return values configure RequestMappingHandlerAdapter directly.
  77. ]]></xsd:documentation>
  78. </xsd:annotation>
  79. <xsd:complexType>
  80. <xsd:sequence>
  81. <xsd:element ref="beans:bean" minOccurs="1" maxOccurs="unbounded">
  82. <xsd:annotation>
  83. <xsd:documentation><![CDATA[
  84. The HandlerMethodReturnValueHandler bean definition.
  85. ]]></xsd:documentation>
  86. </xsd:annotation>
  87. </xsd:element>
  88. </xsd:sequence>
  89. </xsd:complexType>
  90. </xsd:element>
  91. </xsd:all>
  92. <xsd:attribute name="conversion-service" type="xsd:string">
  93. <xsd:annotation>
  94. <xsd:documentation source="java:org.springframework.core.convert.ConversionService"><![CDATA[
  95. The bean name of the ConversionService that is to be used for type conversion during field binding.
  96. This attribute is not required, and only needs to be specified explicitly if custom converters need to be configured.
  97. If not specified, a default FormattingConversionService is registered that contains converters to/from standard JDK types.
  98. In addition, full support for date/time formatting will be installed if the Joda Time library is present on the classpath.
  99. ]]></xsd:documentation>
  100. <xsd:appinfo>
  101. <tool:annotation kind="ref">
  102. <tool:expected-type type="java:org.springframework.core.convert.ConversionService" />
  103. </tool:annotation>
  104. </xsd:appinfo>
  105. </xsd:annotation>
  106. </xsd:attribute>
  107. <xsd:attribute name="validator" type="xsd:string">
  108. <xsd:annotation>
  109. <xsd:documentation source="java:org.springframework.validation.Validator"><![CDATA[
  110. The bean name of the Validator that is to be used to validate Controller model objects.
  111. This attribute is not required, and only needs to be specified explicitly if a custom Validator needs to be configured.
  112. If not specified, JSR-303 validation will be installed if a JSR-303 provider is present on the classpath.
  113. ]]></xsd:documentation>
  114. <xsd:appinfo>
  115. <tool:annotation kind="ref">
  116. <tool:expected-type type="java:org.springframework.validation.Validator" />
  117. </tool:annotation>
  118. </xsd:appinfo>
  119. </xsd:annotation>
  120. </xsd:attribute>
  121. <xsd:attribute name="message-codes-resolver" type="xsd:string">
  122. <xsd:annotation>
  123. <xsd:documentation><![CDATA[
  124. The bean name of a MessageCodesResolver to use to build message codes from data binding and validation error codes.
  125. This attribute is not required.
  126. If not specified the DefaultMessageCodesResolver is used.
  127. ]]></xsd:documentation>
  128. <xsd:appinfo>
  129. <tool:annotation kind="ref">
  130. <tool:expected-type type="java:org.springframework.validation.MessageCodesResolver" />
  131. </tool:annotation>
  132. </xsd:appinfo>
  133. </xsd:annotation>
  134. </xsd:attribute>
  135. <xsd:attribute name="ignoreDefaultModelOnRedirect" type="xsd:boolean">
  136. <xsd:annotation>
  137. <xsd:documentation><![CDATA[
  138. By default the content of the "default" model is used both during rendering and redirect scenarios.
  139. Alternatively a controller method can declare a RedirectAttributes argument and use it to provide attributes for a redirect.
  140. Setting this flag to true ensures the "default" model is never used in a redirect scenario even if a RedirectAttributes argument is not declared.
  141. Setting it to false means the "default" model may be used in a redirect if the controller method doesn't declare a RedirectAttributes argument.
  142. The default setting is false but new applications should consider setting it to true.
  143. ]]></xsd:documentation>
  144. </xsd:annotation>
  145. </xsd:attribute>
  146. </xsd:complexType>
  147. </xsd:element>
  148. <xsd:element name="resources">
  149. <xsd:annotation>
  150. <xsd:documentation
  151. source="java:org.springframework.web.servlet.resource.ResourceHttpRequestHandler"><![CDATA[
  152. Configures a handler for serving static resources such as images, js, and, css files with cache headers optimized for efficient
  153. loading in a web browser. Allows resources to be served out of any path that is reachable via Spring's Resource handling.
  154. ]]></xsd:documentation>
  155. </xsd:annotation>
  156. <xsd:complexType>
  157. <xsd:attribute name="mapping" use="required" type="xsd:string">
  158. <xsd:annotation>
  159. <xsd:documentation><![CDATA[
  160. The URL mapping pattern, within the current Servlet context, to use for serving resources from this handler, such as "/resources/**"
  161. ]]></xsd:documentation>
  162. </xsd:annotation>
  163. </xsd:attribute>
  164. <xsd:attribute name="location" use="required" type="xsd:string">
  165. <xsd:annotation>
  166. <xsd:documentation><![CDATA[
  167. The resource location from which to serve static content, specified at a Spring Resource pattern.
  168. Each location must point to a valid directory. Multiple locations may be specified as a comma-separated list,
  169. and the locations will be checked for a given resource in the order specified. For example, a value of
  170. "/, classpath:/META-INF/public-web-resources/" will allow resources to be served both from the web app
  171. root and from any JAR on the classpath that contains a /META-INF/public-web-resources/ directory,
  172. with resources in the web app root taking precedence.
  173. ]]></xsd:documentation>
  174. </xsd:annotation>
  175. </xsd:attribute>
  176. <xsd:attribute name="cache-period" type="xsd:string">
  177. <xsd:annotation>
  178. <xsd:documentation>
  179. <![CDATA[
  180. Specifies the cache period for the resources served by this resource handler, in seconds.
  181. The default is to not send any cache headers but rather to rely on last-modified timestamps only.
  182. Set this to 0 in order to send cache headers that prevent caching, or to a positive number of
  183. seconds in order to send cache headers with the given max-age value.
  184. ]]></xsd:documentation>
  185. </xsd:annotation>
  186. </xsd:attribute>
  187. <xsd:attribute name="order" type="xsd:int">
  188. <xsd:annotation>
  189. <xsd:documentation>
  190. <![CDATA[
  191. Specifies the order of the HandlerMapping for the resource handler. The default order is Ordered.LOWEST_PRECEDENCE - 1.
  192. ]]></xsd:documentation>
  193. </xsd:annotation>
  194. </xsd:attribute>
  195. </xsd:complexType>
  196. </xsd:element>
  197. <xsd:element name="default-servlet-handler">
  198. <xsd:annotation>
  199. <xsd:documentation
  200. source="java:org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler"><![CDATA[
  201. Configures a handler for serving static resources by forwarding to the Servlet container's default Servlet. Use of this
  202. handler allows using a "/" mapping with the DispatcherServlet while still utilizing the Servlet container to serve static
  203. resources.
  204. This handler will forward all requests to the default Servlet. Therefore it is important that it remains last in the
  205. order of all other URL HandlerMappings. That will be the case if you use the "annotation-driven" element or alternatively
  206. if you are setting up your customized HandlerMapping instance be sure to set its "order" property to a value lower than
  207. that of the DefaultServletHttpRequestHandler, which is Integer.MAX_VALUE.
  208. ]]></xsd:documentation>
  209. </xsd:annotation>
  210. <xsd:complexType>
  211. <xsd:attribute name="default-servlet-name" type="xsd:string">
  212. <xsd:annotation>
  213. <xsd:documentation><![CDATA[
  214. The name of the default Servlet to forward to for static resource requests. The handler will try to auto-detect the container's
  215. default Servlet at startup time using a list of known names. If the default Servlet cannot be detected because of using an unknown
  216. container or because it has been manually configured, the servlet name must be set explicitly.
  217. ]]></xsd:documentation>
  218. </xsd:annotation>
  219. </xsd:attribute>
  220. </xsd:complexType>
  221. </xsd:element>
  222. <xsd:element name="interceptors">
  223. <xsd:annotation>
  224. <xsd:documentation><![CDATA[
  225. The ordered set of interceptors that intercept HTTP Servlet Requests handled by Controllers.
  226. Interceptors allow requests to be pre/post processed before/after handling.
  227. Each inteceptor must implement the org.springframework.web.servlet.HandlerInterceptor or
  228. org.springframework.web.context.request.WebRequestInterceptor interface.
  229. The interceptors in this set are automatically configured on each registered HandlerMapping.
  230. The URI paths each interceptor applies to are configurable.
  231. ]]></xsd:documentation>
  232. </xsd:annotation>
  233. <xsd:complexType>
  234. <xsd:choice maxOccurs="unbounded">
  235. <xsd:choice>
  236. <xsd:element ref="beans:bean">
  237. <xsd:annotation>
  238. <xsd:documentation><![CDATA[
  239. Registers an interceptor that intercepts every request regardless of its URI path..
  240. ]]></xsd:documentation>
  241. </xsd:annotation>
  242. </xsd:element>
  243. <xsd:element ref="beans:ref">
  244. <xsd:annotation>
  245. <xsd:documentation><![CDATA[
  246. Registers an interceptor that intercepts every request regardless of its URI path..
  247. ]]></xsd:documentation>
  248. </xsd:annotation>
  249. </xsd:element>
  250. </xsd:choice>
  251. <xsd:element name="interceptor">
  252. <xsd:annotation>
  253. <xsd:documentation source="java:org.springframework.web.servlet.handler.MappedInterceptor"><![CDATA[
  254. Registers an interceptor that interceptors requests sent to one or more URI paths.
  255. ]]></xsd:documentation>
  256. </xsd:annotation>
  257. <xsd:complexType>
  258. <xsd:sequence>
  259. <xsd:element name="mapping" maxOccurs="unbounded">
  260. <xsd:complexType>
  261. <xsd:attribute name="path" type="xsd:string" use="required">
  262. <xsd:annotation>
  263. <xsd:documentation><![CDATA[
  264. A path into the application intercepted by this interceptor.
  265. Exact path mapping URIs (such as "/myPath") are supported as well as Ant-stype path patterns (such as /myPath/**).
  266. ]]></xsd:documentation>
  267. </xsd:annotation>
  268. </xsd:attribute>
  269. </xsd:complexType>
  270. </xsd:element>
  271. <xsd:choice>
  272. <xsd:element ref="beans:bean">
  273. <xsd:annotation>
  274. <xsd:documentation><![CDATA[
  275. The interceptor's bean definition.
  276. ]]></xsd:documentation>
  277. </xsd:annotation>
  278. </xsd:element>
  279. <xsd:element ref="beans:ref">
  280. <xsd:annotation>
  281. <xsd:documentation><![CDATA[
  282. A reference to an interceptor bean.
  283. ]]></xsd:documentation>
  284. </xsd:annotation>
  285. </xsd:element>
  286. </xsd:choice>
  287. </xsd:sequence>
  288. </xsd:complexType>
  289. </xsd:element>
  290. </xsd:choice>
  291. </xsd:complexType>
  292. </xsd:element>
  293. <xsd:element name="view-controller">
  294. <xsd:annotation>
  295. <xsd:documentation
  296. source="java:org.springframework.web.servlet.mvc.ParameterizableViewController"><![CDATA[
  297. Defines a simple Controller that selects a view to render the response.
  298. ]]></xsd:documentation>
  299. </xsd:annotation>
  300. <xsd:complexType>
  301. <xsd:attribute name="path" type="xsd:string" use="required">
  302. <xsd:annotation>
  303. <xsd:documentation><![CDATA[
  304. The URL path the view is mapped to.
  305. ]]></xsd:documentation>
  306. </xsd:annotation>
  307. </xsd:attribute>
  308. <xsd:attribute name="view-name" type="xsd:string">
  309. <xsd:annotation>
  310. <xsd:documentation><![CDATA[
  311. The name of the view to render. Optional.
  312. If not specified, the view name will be determined from the current HttpServletRequest
  313. by the DispatcherServlet's RequestToViewNameTranslator.
  314. ]]></xsd:documentation>
  315. </xsd:annotation>
  316. </xsd:attribute>
  317. </xsd:complexType>
  318. </xsd:element>
  319. </xsd:schema>