simple spring example help

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

simple spring example help

bitsofinfo
Hi,
I am trying to wire up the following in spring. I can get the "topComponent" object from my spring context. I invoke start() on it, however the SpringRouter I have setup does not seem to be registered?

No matter what URI I go to at localhost:8090/restlet/20140101 i just get 404's

What am I missing? Any help appreciated, thanks

LOG OUTPUT
Starting the internal [HTTP/1.1] server on port 8090
2014-08-20 10:06:21 0:0:0:0:0:0:0:1%0 - - 8090 GET /restlet/20140101 - 404 439 0 4 http://localhost:8090        my user agent


        <bean id="topComponent" class="org.restlet.ext.spring.SpringComponent">
            <property name="server">
                <bean class="org.restlet.ext.spring.SpringServer">
                    <constructor-arg value="http" />
                    <constructor-arg value="8090" />
                </bean>
            </property>
            <property name="defaultTarget" ref="defaultRouter" />
        </bean>
       
         <bean id="topComponent.context" class="org.springframework.beans.factory.config.PropertyPathFactoryBean" />
       
        <bean id="defaultRouter" class="org.restlet.ext.spring.SpringRouter">
           <constructor-arg ref="topComponent.context"/>
            <property name="attachments">
                <map>
                    <entry key="/restlet" value-ref="rootRouter" />
                </map>
            </property>
        </bean>
       
        <bean id="rootRouter" class="org.restlet.ext.spring.SpringRouter">
            <property name="attachments">
                <map>
                    <entry key="/{apiVersion}">
                        <ref bean="myResource"/>
                    </entry>
                 </map>
            </property>
        </bean>
       
        <bean id="myResource" class="my.MyResource" scope="prototype">
        </bean>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3086957
Loading...