SpringMVC配置拦截器没有生效

最近在做拦截器这块,在springmvc.xml中配置了拦截器并没有生效.代码如下:

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

     
   

     
   <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">  
     <property name="prefix" value="/"/>
     <property name="suffix" value=".jsp"/>  
   bean>  

     
   <context:component-scan base-package="com.lenyue.e8game.controller"/>

   
    <mvc:resources mapping="../css/**" location="/css/" />
    <mvc:resources mapping="../js/**" location="/js/" />
    <mvc:resources mapping="../img/**" location="/img/" />
        
     <bean id="multipartResolver"
        class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
        <property name="maxUploadSize" value="17367648787">property>
       <property name="defaultEncoding" value="UTF-8">property> 
   bean>

    
    <bean id="exceptionResolver" class="com.lenyue.e8game.exception.MyselfExceptionResolver">bean>
    
    <mvc:interceptors>
        <mvc:interceptor>
            
            <mvc:mapping path="/**" />
            
            <mvc:exclude-mapping path="/managers/sendMessage" />
            <mvc:exclude-mapping path="/managers/login" />
            <bean class="com.lenyue.e8game.interceptor.TokenInterceptor">bean>
        mvc:interceptor>
        
    mvc:interceptors>
beans>  

这个并没有生效是为什么呢?

你可能感兴趣的:(SpringMVC配置拦截器没有生效)