Skip to content

Commit b7b52ff

Browse files
author
Keith Donald
committed
renamed path element to mapping per code review
1 parent 7a1c4d2 commit b7b52ff

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/config/InterceptorsBeanDefinitionParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public BeanDefinition parse(Element element, ParserContext parserContext) {
4444
String[] pathPatterns;
4545
BeanDefinitionHolder interceptorDef;
4646
if ("interceptor".equals(interceptor.getLocalName())) {
47-
List<Element> paths = DomUtils.getChildElementsByTagName(interceptor, "path");
47+
List<Element> paths = DomUtils.getChildElementsByTagName(interceptor, "mapping");
4848
pathPatterns = new String[paths.size()];
4949
for (int i = 0; i < paths.size(); i++) {
50-
pathPatterns[i] = paths.get(i).getAttribute("value");
50+
pathPatterns[i] = paths.get(i).getAttribute("path");
5151
}
5252
Element interceptorBean = DomUtils.getChildElementByTagName(interceptor, "bean");
5353
interceptorDef = parserContext.getDelegate().parseBeanDefinitionElement(interceptorBean);

org.springframework.web.servlet/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.0.xsd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575
</xsd:annotation>
7676
<xsd:complexType>
7777
<xsd:sequence>
78-
<xsd:element name="path" maxOccurs="unbounded">
78+
<xsd:element name="mapping" maxOccurs="unbounded">
7979
<xsd:complexType>
80-
<xsd:attribute name="value" type="xsd:string" use="required">
80+
<xsd:attribute name="path" type="xsd:string" use="required">
8181
<xsd:annotation>
8282
<xsd:documentation><![CDATA[
8383
A path into the application intercepted by this interceptor.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
<mvc:interceptors>
1111
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" />
1212
<mvc:interceptor>
13-
<mvc:path value="/**" />
13+
<mvc:mapping path="/**" />
1414
<bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor" />
1515
</mvc:interceptor>
1616
<mvc:interceptor>
17-
<mvc:path value="/logged/**" />
18-
<mvc:path value="/foo/logged" />
17+
<mvc:mapping path="/logged/**" />
18+
<mvc:mapping path="/foo/logged" />
1919
<bean class="org.springframework.web.context.request.Log4jNestedDiagnosticContextInterceptor" />
2020
</mvc:interceptor>
2121
</mvc:interceptors>

0 commit comments

Comments
 (0)