我在尝试运行示例应用程序时获得以下ClassNotFoundException
。如果有人能指出我做错了什么会很棒。谢谢!
SEVERE: Context initialization failed
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.thecafetechno.HelloWorldController] for bean with name '/requestURI.htm' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]; nested exception is java.lang.ClassNotFoundException: com.thecafetechno.HelloWorldController
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
....
Caused by: java.lang.ClassNotFoundException: com.thecafetechno.HelloWorldController
....
但是,我在正确的地方定义了HelloWorldController
。这是我的调度程序servlet。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="viewResolverBean" class="org.springframework.web.servlet.view.InternalResourceViewResolver" >
<property name="prefix">
<value>/WEB-INF/jsp/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<bean name="/requestURI.htm" class="com.thecafetechno.HelloWorldController" >
<property name="processor" ref="processorBean"/>
</bean>
<bean name="processorBean" class="process.Processor" />
</beans>
答案 0 :(得分:0)
您是否可以发送该示例应用程序,以便我可以快速查看。这似乎是你如何构建应用程序的一些问题。