cvc-complex-type.2.4.a:从元素'拦截器'开始发现无效内容

时间:2017-02-21 06:15:43

标签: spring spring-mvc servlets interceptor

将以下代码添加到我的applicationContext.xml文件中会出现上述错误。

<!-- Configuring interceptors based on URI -->
<interceptors>
    <interceptor>
        <mapping path="/home" />
        <beans:bean class="com.journaldev.spring.RequestProcessingTimeInterceptor"></beans:bean>
    </interceptor>
</interceptors>

错误是:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'interceptors'. One of '{"http://www.springframework.org/ schema/beans":import, "http://www.springframework.org/schema/beans":alias, "http://www.springframework.org/schema/beans":bean, WC[##other:"http://www.springframework.org/schema/beans"]}' is expected.

请原谅我,如果这是一个非常简单的问题。

0 个答案:

没有答案