[Restlet] restlet1.0集成spring的问题

gaofeng_867 2013-01-14
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> 
   
Global site tag (gtag.js) - Google Analytics