问答详情
源自:2-2 拦截器的实现

xml文件配置照着老师的文件敲的为什么会报错?

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:mvc="http://www.springframework.org/schma/mvc"
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
       	http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
       	http://www.springframework.org/schema/tx
       	http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
       	http://www.springframework.org/schema/aop
       	http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
       	http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context-4.0.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd"> 

	<context:component-scan base-package="com.core.ssm.controller"/>
	
	<mvc:interceptors>
		<bean class="com.core.ssm.interceptor.UserInterceptor"></bean>
	</mvc:interceptors>

错误:

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:interceptors'.


提问者:KeepWaiting4214730 2017-07-31 16:10

个回答