restlet集成spring的问题,求解啊!

gf05011 2013-01-14 09:54:12
restlet1.0集成spring2,总是提示找不到一个bean:
Error creating bean with name 'component' defined in ServletContext resource [/WEB-INF/classes/applicationContext-rest.xml]: Cannot resolve reference to bean 'myrestRoute' while setting bean property 'defaultTarget';.......

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-rest.xml配置如下:
<bean id="component" class="org.restlet.ext.spring.SpringComponent">
<property name="defaultTarget" ref="myrestRoute" />
</bean>

<bean id="myrestRoute" class="org.restlet.ext.spring.SpringRouter">
<property name="attachments">
<map>
<entry key="/customers/{custId}">
<bean class="org.restlet.ext.spring.SpringFinder">
<lookup-method name="createResource" bean="CustomerResource" />
</bean>
</entry>
</map>
</property>
</bean>
...全文
115 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
gf05011 2013-01-14
  • 打赏
  • 举报
回复
没人回答啊....
gf05011 2013-01-14
  • 打赏
  • 举报
回复
自己顶一下!!
gf05011 2013-01-14
  • 打赏
  • 举报
回复
此贴沉了~~~

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧