Browse Source

Fix casing in spring mvc namespace attributes

Update "enableMatrixVariables" and "ignoreDefaultModelOnRedirect" to
use the more conventional XML form "enable-matrix-variables" and
"ignore-default-model-on-redirect".

Both forms are now supported by `AnnotationDrivenBeanDefinitionParser`,
with newer names being defined in the 4.0 XSD and the older names
remaining in the 3.2 XSD.

Issue: SPR-11136
pull/423/head
Phillip Webb 12 years ago
parent
commit
5e02a6dda3
  1. 10
      spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java
  2. 12
      spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.0.xsd
  3. 14
      spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java
  4. 6
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-argument-resolvers.xml
  5. 2
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-async-support.xml
  6. 4
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-bean-decoration.xml
  7. 4
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-content-negotiation-manager.xml
  8. 6
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-custom-conversion-service.xml
  9. 13
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-custom-validator-32.xml
  10. 10
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-custom-validator.xml
  11. 2
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-default-servlet-optional-attrs.xml
  12. 2
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-default-servlet.xml
  13. 6
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-interceptors.xml
  14. 2
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-message-codes-resolver.xml
  15. 4
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-message-converters-defaults-off.xml
  16. 2
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-message-converters.xml
  17. 2
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-resources-optional-attrs.xml
  18. 2
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-resources.xml
  19. 2
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-return-value-handlers.xml
  20. 4
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-view-controllers-minimal.xml
  21. 6
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-view-controllers.xml
  22. 2
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config.xml

10
spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java

@ -161,8 +161,9 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
handlerMappingDef.getPropertyValues().add("order", 0); handlerMappingDef.getPropertyValues().add("order", 0);
handlerMappingDef.getPropertyValues().add("contentNegotiationManager", contentNegotiationManager); handlerMappingDef.getPropertyValues().add("contentNegotiationManager", contentNegotiationManager);
String methodMappingName = parserContext.getReaderContext().registerWithGeneratedName(handlerMappingDef); String methodMappingName = parserContext.getReaderContext().registerWithGeneratedName(handlerMappingDef);
if (element.hasAttribute("enableMatrixVariables")) { if (element.hasAttribute("enable-matrix-variables") || element.hasAttribute("enableMatrixVariables")) {
Boolean enableMatrixVariables = Boolean.valueOf(element.getAttribute("enableMatrixVariables")); Boolean enableMatrixVariables = Boolean.valueOf(element.getAttribute(
element.hasAttribute("enable-matrix-variables") ? "enable-matrix-variables" : "enableMatrixVariables"));
handlerMappingDef.getPropertyValues().add("removeSemicolonContent", !enableMatrixVariables); handlerMappingDef.getPropertyValues().add("removeSemicolonContent", !enableMatrixVariables);
} }
@ -191,8 +192,9 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
handlerAdapterDef.getPropertyValues().add("contentNegotiationManager", contentNegotiationManager); handlerAdapterDef.getPropertyValues().add("contentNegotiationManager", contentNegotiationManager);
handlerAdapterDef.getPropertyValues().add("webBindingInitializer", bindingDef); handlerAdapterDef.getPropertyValues().add("webBindingInitializer", bindingDef);
handlerAdapterDef.getPropertyValues().add("messageConverters", messageConverters); handlerAdapterDef.getPropertyValues().add("messageConverters", messageConverters);
if (element.hasAttribute("ignoreDefaultModelOnRedirect")) { if (element.hasAttribute("ignore-default-model-on-redirect") || element.hasAttribute("ignoreDefaultModelOnRedirect")) {
Boolean ignoreDefaultModel = Boolean.valueOf(element.getAttribute("ignoreDefaultModelOnRedirect")); Boolean ignoreDefaultModel = Boolean.valueOf(element.getAttribute(
element.hasAttribute("ignore-default-model-on-redirect") ? "ignore-default-model-on-redirect" : "ignoreDefaultModelOnRedirect"));
handlerAdapterDef.getPropertyValues().add("ignoreDefaultModelOnRedirect", ignoreDefaultModel); handlerAdapterDef.getPropertyValues().add("ignoreDefaultModelOnRedirect", ignoreDefaultModel);
} }
if (argumentResolvers != null) { if (argumentResolvers != null) {

12
spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.0.xsd

@ -80,7 +80,7 @@
</xsd:element> </xsd:element>
</xsd:sequence> </xsd:sequence>
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="return-value-handlers" minOccurs="0"> <xsd:element name="return-value-handlers" minOccurs="0">
<xsd:annotation> <xsd:annotation>
<xsd:documentation><![CDATA[ <xsd:documentation><![CDATA[
@ -100,7 +100,7 @@
</xsd:element> </xsd:element>
</xsd:sequence> </xsd:sequence>
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="async-support" minOccurs="0"> <xsd:element name="async-support" minOccurs="0">
<xsd:annotation> <xsd:annotation>
<xsd:documentation><![CDATA[ <xsd:documentation><![CDATA[
@ -233,7 +233,7 @@
</xsd:appinfo> </xsd:appinfo>
</xsd:annotation> </xsd:annotation>
</xsd:attribute> </xsd:attribute>
<xsd:attribute name="enableMatrixVariables" type="xsd:boolean"> <xsd:attribute name="enable-matrix-variables" type="xsd:boolean">
<xsd:annotation> <xsd:annotation>
<xsd:documentation><![CDATA[ <xsd:documentation><![CDATA[
Matrix variables can appear in any path segment, each matrix variable separated with a ";" (semicolon). Matrix variables can appear in any path segment, each matrix variable separated with a ";" (semicolon).
@ -244,11 +244,11 @@
]]></xsd:documentation> ]]></xsd:documentation>
</xsd:annotation> </xsd:annotation>
</xsd:attribute> </xsd:attribute>
<xsd:attribute name="ignoreDefaultModelOnRedirect" type="xsd:boolean"> <xsd:attribute name="ignore-default-model-on-redirect" type="xsd:boolean">
<xsd:annotation> <xsd:annotation>
<xsd:documentation><![CDATA[ <xsd:documentation><![CDATA[
By default the content of the "default" model is used both during rendering and redirect scenarios. 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. 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 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. 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. The default setting is false but new applications should consider setting it to true.

14
spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java

@ -185,7 +185,19 @@ public class MvcNamespaceTests {
@Test @Test
public void testCustomValidator() throws Exception { public void testCustomValidator() throws Exception {
loadBeanDefinitions("mvc-config-custom-validator.xml", 13); doTestCustomValidator("mvc-config-custom-validator.xml");
}
@Test
public void testCustomValidator32() throws Exception {
doTestCustomValidator("mvc-config-custom-validator-32.xml");
}
/**
* @throws Exception
*/
private void doTestCustomValidator(String xml) throws Exception {
loadBeanDefinitions(xml, 13);
RequestMappingHandlerMapping mapping = appContext.getBean(RequestMappingHandlerMapping.class); RequestMappingHandlerMapping mapping = appContext.getBean(RequestMappingHandlerMapping.class);
assertNotNull(mapping); assertNotNull(mapping);

6
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-argument-resolvers.xml

@ -3,12 +3,12 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.1.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven> <mvc:annotation-driven>
<mvc:argument-resolvers> <mvc:argument-resolvers>
<bean class="org.springframework.web.servlet.config.TestWebArgumentResolver"/> <bean class="org.springframework.web.servlet.config.TestWebArgumentResolver"/>
<bean class="org.springframework.web.servlet.config.TestHandlerMethodArgumentResolver"/> <bean class="org.springframework.web.servlet.config.TestHandlerMethodArgumentResolver"/>
</mvc:argument-resolvers> </mvc:argument-resolvers>
</mvc:annotation-driven> </mvc:annotation-driven>

2
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-async-support.xml

@ -2,7 +2,7 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven> <mvc:annotation-driven>
<mvc:async-support default-timeout="2500" task-executor="executor"> <mvc:async-support default-timeout="2500" task-executor="executor">

4
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-bean-decoration.xml

@ -4,7 +4,7 @@
xmlns:p="http://www.springframework.org/schema/p" xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.0.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven /> <mvc:annotation-driven />
@ -12,7 +12,7 @@
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" p:paramName="lang" /> <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" p:paramName="lang" />
<bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor"> <bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor">
<property name="paramName" value="style" /> <property name="paramName" value="style" />
</bean> </bean>
</mvc:interceptors> </mvc:interceptors>
</beans> </beans>

4
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-content-negotiation-manager.xml

@ -2,8 +2,8 @@
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd"> http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager" /> <mvc:annotation-driven content-negotiation-manager="contentNegotiationManager" />

6
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-custom-conversion-service.xml

@ -3,10 +3,10 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.0.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven conversion-service="conversionService" /> <mvc:annotation-driven conversion-service="conversionService" />
<bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean" /> <bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean" />
</beans> </beans>

13
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-custom-validator-32.xml

@ -0,0 +1,13 @@
<?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>

10
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-custom-validator.xml

@ -3,11 +3,11 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven validator="validator"
ignore-default-model-on-redirect="true" enable-matrix-variables="true" />
<mvc:annotation-driven validator="validator"
ignoreDefaultModelOnRedirect="true" enableMatrixVariables="true" />
<bean id="validator" class="org.springframework.web.servlet.config.MvcNamespaceTests$TestValidator" /> <bean id="validator" class="org.springframework.web.servlet.config.MvcNamespaceTests$TestValidator" />
</beans> </beans>

2
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-default-servlet-optional-attrs.xml

@ -3,7 +3,7 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.0.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:default-servlet-handler default-servlet-name="custom" /> <mvc:default-servlet-handler default-servlet-name="custom" />

2
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-default-servlet.xml

@ -3,7 +3,7 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.0.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:default-servlet-handler /> <mvc:default-servlet-handler />

6
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-interceptors.xml

@ -3,7 +3,7 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven /> <mvc:annotation-driven />
@ -23,7 +23,7 @@
</mvc:interceptor> </mvc:interceptor>
</mvc:interceptors> </mvc:interceptors>
<bean id="log4jInterceptor" <bean id="log4jInterceptor"
class="org.springframework.web.context.request.Log4jNestedDiagnosticContextInterceptor" /> class="org.springframework.web.context.request.Log4jNestedDiagnosticContextInterceptor" />
</beans> </beans>

2
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-message-codes-resolver.xml

@ -3,7 +3,7 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.1.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven message-codes-resolver="messageCodesResolver"/> <mvc:annotation-driven message-codes-resolver="messageCodesResolver"/>

4
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-message-converters-defaults-off.xml

@ -2,8 +2,8 @@
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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-3.2.xsd 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"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven> <mvc:annotation-driven>
<mvc:message-converters register-defaults="false"> <mvc:message-converters register-defaults="false">

2
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-message-converters.xml

@ -3,7 +3,7 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.1.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven> <mvc:annotation-driven>
<mvc:message-converters> <mvc:message-converters>

2
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-resources-optional-attrs.xml

@ -3,7 +3,7 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.0.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:resources mapping="/resources/**" location="/, classpath:/META-INF/" cache-period="3600" order="5"/> <mvc:resources mapping="/resources/**" location="/, classpath:/META-INF/" cache-period="3600" order="5"/>

2
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-resources.xml

@ -3,7 +3,7 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.0.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:resources mapping="/resources/**" location="/, classpath:/META-INF/" /> <mvc:resources mapping="/resources/**" location="/, classpath:/META-INF/" />

2
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-return-value-handlers.xml

@ -3,7 +3,7 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.1.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven> <mvc:annotation-driven>
<mvc:return-value-handlers> <mvc:return-value-handlers>

4
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-view-controllers-minimal.xml

@ -3,8 +3,8 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.0.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:view-controller path="/" view-name="home"/> <mvc:view-controller path="/" view-name="home"/>
</beans> </beans>

6
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-view-controllers.xml

@ -3,12 +3,12 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.0.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven/> <mvc:annotation-driven/>
<mvc:view-controller path="/foo"/> <mvc:view-controller path="/foo"/>
<mvc:view-controller path="/bar" view-name="baz"/> <mvc:view-controller path="/bar" view-name="baz"/>
<mvc:view-controller path="/" view-name="root"/> <mvc:view-controller path="/" view-name="root"/>
@ -17,5 +17,5 @@
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/> <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/>
<bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor"/> <bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor"/>
</mvc:interceptors> </mvc:interceptors>
</beans> </beans>

2
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config.xml

@ -3,7 +3,7 @@
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 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.0.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven /> <mvc:annotation-driven />

Loading…
Cancel
Save