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>