Hi Jean-Philippe,

On Jan 21, 2009, at 1:07 PM, Jean-Philippe Steinmetz wrote:

> Quick question about attaching URI patterns and resource classes to  
> the router. Is there a way to make this happen more automagically  
> with annotations or some other mechanism? Adding each one by hand  
> will get unwieldy and requires touching the main Application class  
> every time I want to add a new resource. I see there is some work  
> with this with JAX-RS but I wasn't sure if this was included in  
> restlet or not.

Since you are already using Spring, you might consider using  
SpringBeanRouter:

http://www.restlet.org:8080/documentation/1.1/ext/org/restlet/ext/spring/SpringBeanRouter.html

It allows you to define URI templates in your application context.  It  
also allows you to do Spring DI on the resource instances.

Rhett

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

Reply via email to