restlet-servlet.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to Jasig under one or more contributor license
  4. agreements. See the NOTICE file distributed with this work
  5. for additional information regarding copyright ownership.
  6. Jasig licenses this file to you under the Apache License,
  7. Version 2.0 (the "License"); you may not use this file
  8. except in compliance with the License. You may obtain a
  9. copy of the License at the following location:
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing,
  12. software distributed under the License is distributed on an
  13. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. KIND, either express or implied. See the License for the
  15. specific language governing permissions and limitations
  16. under the License.
  17. -->
  18. <beans
  19. xmlns="http://www.springframework.org/schema/beans"
  20. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  21. xmlns:context="http://www.springframework.org/schema/context"
  22. xmlns:p="http://www.springframework.org/schema/p"
  23. xsi:schemaLocation="http://www.springframework.org/schema/beans
  24. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  25. http://www.springframework.org/schema/context
  26. http://www.springframework.org/schema/context/spring-context-3.0.xsd">
  27. <context:annotation-config/>
  28. <bean id="root" class="org.restlet.ext.spring.SpringRouter">
  29. <property name="attachments">
  30. <map>
  31. <entry key="/tickets">
  32. <bean class="org.restlet.ext.spring.SpringFinder">
  33. <lookup-method name="createResource" bean="ticketResource" />
  34. </bean>
  35. </entry>
  36. <entry key="/tickets/{ticketGrantingTicketId}">
  37. <bean class="org.restlet.ext.spring.SpringFinder">
  38. <lookup-method name="createResource" bean="ticketGrantingTicketResource" />
  39. </bean>
  40. </entry>
  41. </map>
  42. </property>
  43. </bean>
  44. <bean id="ticketResource" class="org.jasig.cas.integration.restlet.TicketResource" scope="prototype" />
  45. <bean id="ticketGrantingTicketResource" class="org.jasig.cas.integration.restlet.TicketGrantingTicketResource" scope="prototype"
  46. p:httpClient-ref="httpClient"/>
  47. </beans>