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

来源:2-2 拦截器的实现

KeepWaiting4214730

2017-07-31 16:10

<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'.


写回答 关注

2回答

Spring MVC拦截器

Spring MVC拦截器的工作原理及配置,介绍拦截器与过滤器的区别

73583 学习 · 56 问题

查看课程

相似问题