renamed path element to mapping per code review

This commit is contained in:
Keith Donald 2009-11-30 16:32:59 +00:00
parent 7a1c4d23b4
commit b7b52fffea
3 changed files with 7 additions and 7 deletions

View File

@ -44,10 +44,10 @@ class InterceptorsBeanDefinitionParser implements BeanDefinitionParser {
String[] pathPatterns;
BeanDefinitionHolder interceptorDef;
if ("interceptor".equals(interceptor.getLocalName())) {
List<Element> paths = DomUtils.getChildElementsByTagName(interceptor, "path");
List<Element> paths = DomUtils.getChildElementsByTagName(interceptor, "mapping");
pathPatterns = new String[paths.size()];
for (int i = 0; i < paths.size(); i++) {
pathPatterns[i] = paths.get(i).getAttribute("value");
pathPatterns[i] = paths.get(i).getAttribute("path");
}
Element interceptorBean = DomUtils.getChildElementByTagName(interceptor, "bean");
interceptorDef = parserContext.getDelegate().parseBeanDefinitionElement(interceptorBean);

View File

@ -75,9 +75,9 @@
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="path" maxOccurs="unbounded">
<xsd:element name="mapping" maxOccurs="unbounded">
<xsd:complexType>
<xsd:attribute name="value" type="xsd:string" use="required">
<xsd:attribute name="path" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation><![CDATA[
A path into the application intercepted by this interceptor.

View File

@ -10,12 +10,12 @@
<mvc:interceptors>
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" />
<mvc:interceptor>
<mvc:path value="/**" />
<mvc:mapping path="/**" />
<bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor" />
</mvc:interceptor>
<mvc:interceptor>
<mvc:path value="/logged/**" />
<mvc:path value="/foo/logged" />
<mvc:mapping path="/logged/**" />
<mvc:mapping path="/foo/logged" />
<bean class="org.springframework.web.context.request.Log4jNestedDiagnosticContextInterceptor" />
</mvc:interceptor>
</mvc:interceptors>