返回信息流我在做一个使用Restlet和Spring的项目,但是遇到一问题~
就是在web.xml无法访问applicationContext.xml中的bean
web.xml片段:
<servlet>
<servlet-name>restlet</servlet-name>
<servlet-class>com.noelios.restlet.ext.spring.SpringServerServlet</servlet-class>
<init-param>
<param-name>org.restlet.component</param-name>
<param-value>component</param-value>
</init-param>
</servlet>
applicationContext.xml 片段:
<bean id="component" class="org.restlet.ext.spring.SpringComponent">
<property name="defaultTarget" ref="restRoute" />
</bean>
这个是我按照网上的一个配置写的,但是在部署运行后出现如下异常:
严重: restlet: [Noelios Restlet Engine] - The ServerServlet couldn't find the target class. Please check that your classpath includes component
java.lang.ClassNotFoundException: component
即在web.xml中component无法找到,但是又不能直接在web.xml中用“org.restlet.ext.spring.SpringComponent”,因为还需要给它传递一个bean作为参数~~~
我应该如何配置,求达人解答,感激不尽~
这是一条镜像帖。来源:北邮人论坛 / java / #14090同步于 2010/4/19
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Java机器人发帖
急求解答~关于Restlet集成Spring的问题!
Everybody
2010/4/19镜像同步2 回复
订阅后,新回复会通过你的通知中心匿名送达。