求解:<mvc:interceptors>标签问题

今天想写拦截器,但是出现问题。一直报org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.MappedInterceptor#1': Cannot create inner bean 'interceptor.PermissionInterceptor#0' of type [interceptor.PermissionInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [interceptor.PermissionInterce ptor] for bean with name 'interceptor.PermissionInterceptor#0' defined in file [D:\Documents\eclipseProjects\SIMS\target\SIMS-0.0.1-SNAPSHOT\WEB-INF\classes\spring-web.xml]; nested exception is java.lang.ClassNotFoundException: interceptor.PermissionInterceptor
配置文件中写的是我自己想写的拦截器类PermissionInterceptor就不行,换成springwebjar包下的interceptor类就可以启动不报错,请问这是什么原因?怎么样才能用我自己写的interceptor。(注:同事说jdk换成1.8就好了,我的jdk是1.6,1.6也支持interceptor哇,求大神给讲讲)

你自己的写的拦截器 需要继承一个拦截器的类

 配置文件写我自己的拦截器类
<mvc:interceptors>
        <mvc:interceptor>
            <mvc:mapping path="/**"/>
            <bean class="interceptor.PermissionInterceptor" />
        </mvc:interceptor>
    </mvc:interceptors>


        springweb下的类就好使的配置
        <mvc:interceptors>
        <mvc:interceptor>
            <mvc:mapping path="/**"/>
            <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" />
        </mvc:interceptor>
    </mvc:interceptors>

和同事研究半天 自己研究半天 终于解决了 class文件没有更新 我删了重新生成就好了 我改过包名 所以路径不对 加载不了 嘿嘿

 Cannot find class [interceptor.PermissionInterce ptor] for bean with name 'interceptor.PermissionInterceptor#0' defined in file [D:\Documents\eclipseProjects\SIMS\target\SIMS-0.0.1-SNAPSHOT\WEB-INF\classes\spring-web.xml]

这句话的意思是,在spring-web.xml文件中定义的interceptor.PermissionInterceptor这个拦截器没有定义。

检查interceptor.PermissionInterceptor这个类是不是没有创建,或者这个类的拦截器构造是不是不对什么的就行了