有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

JAVAlang.ClassNotFoundException:com。低密度脂蛋白。vision86。商业拦截器。登录接收器

当我运行tomcat时,我在浏览器中得到ClassNotFoundException

root cause

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.MappedInterceptor#0': Cannot create inner bean 'loginInterceptor' of type [com.ldl.vision86.business.interceptor.LoginInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.ldl.vision86.business.interceptor.LoginInterceptor] for bean with name 'loginInterceptor' defined in URL [file:/Users/luowensheng/Desktop/TestIOS/86vision/target/haitian/WEB-INF/classes/springMVC.xml]; nested exception is java.lang.ClassNotFoundException: com.ldl.vision86.business.interceptor.LoginInterceptor

...
root cause

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.ldl.vision86.business.interceptor.LoginInterceptor] for bean with name 'loginInterceptor' defined in URL [file:/Users/luowensheng/Desktop/TestIOS/86vision/target/haitian/WEB-INF/classes/springMVC.xml]; nested exception is java.lang.ClassNotFoundException: com.ldl.vision86.business.interceptor.LoginInterceptor

...
root cause

java.lang.ClassNotFoundException: com.ldl.vision86.business.interceptor.LoginInterceptor

但是,无论如何,我的LoginInterceptor.java是存在的

enter image description here


我尝试过清洁->;安装在maven生命周期中
重新启动tomcat

但没有结果


编辑

我在{}中对{}的配置如下:

<bean id="handlerMapping"
      class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping" >
    <property name="interceptors">
        <list>
            <bean class="org.springframework.orm.hibernate4.support.OpenSessionInViewInterceptor">
                <property name="sessionFactory" ref="sessionFactory" />
            </bean>
            <bean class="com.ldl.vision86.business.interceptor.LoginInterceptor"></bean>

            <!-- 国际化操作拦截器 如果采用基于(请求/Session/Cookie)则必需配置 -->
            <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" />
        </list>
    </property>
</bean>

共 (0) 个答案