Skip to content

Commit 0e68d2e

Browse files
committed
Explicit references to spring-mvc-4.2.xsd for Velocity declarations
Issue: SPR-13235
1 parent 9eb713a commit 0e68d2e

File tree

5 files changed

+36
-40
lines changed

5 files changed

+36
-40
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
77
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
88

9+
<mvc:view-controller path="/path" view-name="home"/>
910

10-
<mvc:view-controller path="/path" view-name="home" />
11+
<mvc:redirect-view-controller path="/old" redirect-url="/new"/>
1112

12-
<mvc:redirect-view-controller path="/old" redirect-url="/new" />
13-
14-
<mvc:status-controller path="/bad" status-code="404" />
13+
<mvc:status-controller path="/bad" status-code="404"/>
1514

1615
</beans>

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<beans xmlns="http://www.springframework.org/schema/beans"
3-
xmlns:mvc="http://www.springframework.org/schema/mvc"
3+
xmlns:mvc="http://www.springframework.org/schema/mvc"
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="
66
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
77
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
88

9-
109
<mvc:annotation-driven/>
1110

1211
<mvc:view-controller path="/foo"/>
1312
<mvc:view-controller path="/bar" view-name="baz"/>
1413
<mvc:view-controller path="/" view-name="root"/>
1514

1615
<mvc:redirect-view-controller path="/old" redirect-url="/new"
17-
context-relative="false" status-code="308" keep-query-params="true" />
16+
context-relative="false" status-code="308" keep-query-params="true"/>
1817

19-
<mvc:status-controller path="/bad" status-code="404" />
18+
<mvc:status-controller path="/bad" status-code="404"/>
2019

2120
<mvc:interceptors>
2221
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/>

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

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,44 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<beans xmlns="http://www.springframework.org/schema/beans"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xmlns:mvc="http://www.springframework.org/schema/mvc"
5-
xsi:schemaLocation="
6-
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
7-
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:mvc="http://www.springframework.org/schema/mvc"
5+
xsi:schemaLocation="
6+
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
7+
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd">
88

99
<!--
1010
View resolution finds the ContentNegotiationManager created by or
1111
registered with <mvc:annotation-driven>. Or in its absence simply declare it.
1212
-->
1313

14-
<bean id="mvcContentNegotiationManager"
15-
class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean"/>
14+
<bean id="mvcContentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean"/>
1615

1716
<mvc:view-resolvers>
1817
<mvc:content-negotiation use-not-acceptable="true">
1918
<mvc:default-views>
20-
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView" />
19+
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"/>
2120
</mvc:default-views>
2221
</mvc:content-negotiation>
23-
<mvc:bean-name />
24-
<mvc:jsp />
25-
<mvc:tiles />
26-
<mvc:freemarker />
27-
<mvc:velocity />
28-
<mvc:groovy />
29-
<mvc:script-template />
22+
<mvc:bean-name/>
23+
<mvc:jsp/>
24+
<mvc:tiles/>
25+
<mvc:freemarker/>
26+
<mvc:velocity/>
27+
<mvc:groovy/>
28+
<mvc:script-template/>
3029
</mvc:view-resolvers>
3130

3231
<mvc:tiles-configurer check-refresh="true">
33-
<mvc:definitions location="/org/springframework/web/servlet/resource/tiles/tiles1.xml" />
32+
<mvc:definitions location="/org/springframework/web/servlet/resource/tiles/tiles1.xml"/>
3433
</mvc:tiles-configurer>
3534

3635
<mvc:freemarker-configurer>
37-
<mvc:template-loader-path location="/org/springframework/web/servlet/view" />
36+
<mvc:template-loader-path location="/org/springframework/web/servlet/view"/>
3837
</mvc:freemarker-configurer>
3938

40-
<mvc:velocity-configurer resource-loader-path="/org/springframework/web/servlet/view" />
39+
<mvc:velocity-configurer resource-loader-path="/org/springframework/web/servlet/view"/>
4140

42-
<mvc:groovy-configurer />
41+
<mvc:groovy-configurer/>
4342

4443
<mvc:script-template-configurer engine-name="nashorn" render-function="render"/>
4544

Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<beans xmlns="http://www.springframework.org/schema/beans"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xmlns:mvc="http://www.springframework.org/schema/mvc"
5-
xsi:schemaLocation="
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:mvc="http://www.springframework.org/schema/mvc"
5+
xsi:schemaLocation="
66
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
77
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
88

99
<mvc:view-resolvers order="123">
10-
<mvc:bean-name />
10+
<mvc:bean-name/>
1111
</mvc:view-resolvers>
1212

1313
</beans>

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<beans xmlns="http://www.springframework.org/schema/beans"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xmlns:mvc="http://www.springframework.org/schema/mvc"
5-
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
6-
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:mvc="http://www.springframework.org/schema/mvc"
5+
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
6+
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd">
77

88
<mvc:view-resolvers>
99
<mvc:bean-name/>
@@ -20,8 +20,8 @@
2020
<bean id="customResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"/>
2121

2222
<mvc:tiles-configurer check-refresh="true" validate-definitions="true"
23-
definitions-factory="org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory"
24-
preparer-factory="org.springframework.web.servlet.view.tiles3.SpringBeanPreparerFactory">
23+
definitions-factory="org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory"
24+
preparer-factory="org.springframework.web.servlet.view.tiles3.SpringBeanPreparerFactory">
2525
<mvc:definitions location="/org/springframework/web/servlet/resource/tiles/tiles1.xml"/>
2626
<mvc:definitions location="/org/springframework/web/servlet/resource/tiles/tiles2.xml"/>
2727
</mvc:tiles-configurer>
@@ -35,9 +35,8 @@
3535

3636
<mvc:groovy-configurer resource-loader-path="/test" cache-templates="false" auto-indent="true"/>
3737

38-
<mvc:script-template-configurer engine-name="nashorn" render-function="render"
39-
content-type="text/plain" charset="ISO-8859-1"
40-
resource-loader-path="classpath:" shared-engine="false">
38+
<mvc:script-template-configurer engine-name="nashorn" render-function="render" content-type="text/plain"
39+
charset="ISO-8859-1" resource-loader-path="classpath:" shared-engine="false">
4140
<mvc:script location="org/springframework/web/servlet/view/script/nashorn/render.js"/>
4241
</mvc:script-template-configurer>
4342

0 commit comments

Comments
 (0)