renamed path element to mapping per code review
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2551 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
31a52a0f24
commit
26a1bed4fd
|
|
@ -44,10 +44,10 @@ class InterceptorsBeanDefinitionParser implements BeanDefinitionParser {
|
||||||
String[] pathPatterns;
|
String[] pathPatterns;
|
||||||
BeanDefinitionHolder interceptorDef;
|
BeanDefinitionHolder interceptorDef;
|
||||||
if ("interceptor".equals(interceptor.getLocalName())) {
|
if ("interceptor".equals(interceptor.getLocalName())) {
|
||||||
List<Element> paths = DomUtils.getChildElementsByTagName(interceptor, "path");
|
List<Element> paths = DomUtils.getChildElementsByTagName(interceptor, "mapping");
|
||||||
pathPatterns = new String[paths.size()];
|
pathPatterns = new String[paths.size()];
|
||||||
for (int i = 0; i < paths.size(); i++) {
|
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");
|
Element interceptorBean = DomUtils.getChildElementByTagName(interceptor, "bean");
|
||||||
interceptorDef = parserContext.getDelegate().parseBeanDefinitionElement(interceptorBean);
|
interceptorDef = parserContext.getDelegate().parseBeanDefinitionElement(interceptorBean);
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,9 @@
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="path" maxOccurs="unbounded">
|
<xsd:element name="mapping" maxOccurs="unbounded">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:attribute name="value" type="xsd:string" use="required">
|
<xsd:attribute name="path" type="xsd:string" use="required">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation><![CDATA[
|
<xsd:documentation><![CDATA[
|
||||||
A path into the application intercepted by this interceptor.
|
A path into the application intercepted by this interceptor.
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,12 @@
|
||||||
<mvc:interceptors>
|
<mvc:interceptors>
|
||||||
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" />
|
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" />
|
||||||
<mvc:interceptor>
|
<mvc:interceptor>
|
||||||
<mvc:path value="/**" />
|
<mvc:mapping path="/**" />
|
||||||
<bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor" />
|
<bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor" />
|
||||||
</mvc:interceptor>
|
</mvc:interceptor>
|
||||||
<mvc:interceptor>
|
<mvc:interceptor>
|
||||||
<mvc:path value="/logged/**" />
|
<mvc:mapping path="/logged/**" />
|
||||||
<mvc:path value="/foo/logged" />
|
<mvc:mapping path="/foo/logged" />
|
||||||
<bean class="org.springframework.web.context.request.Log4jNestedDiagnosticContextInterceptor" />
|
<bean class="org.springframework.web.context.request.Log4jNestedDiagnosticContextInterceptor" />
|
||||||
</mvc:interceptor>
|
</mvc:interceptor>
|
||||||
</mvc:interceptors>
|
</mvc:interceptors>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue