Retrieving values from Spring configuration.

2 views
Skip to first unread message

Steve

unread,
Mar 29, 2010, 12:49:01 PM3/29/10
to jax-doclets
Hi there,

Just discovered the JAX-RS doclet and this group. It looks like the
doclet could be useful, but I'm running into a glitch related to our
REST services implementation.

Are there any plans to add support for resource URIs that are
configured in Spring files?

We configure part of the resource URI in Spring config files, leaving
off the @Path annotation at the class level. Without that annotation,
the doclet simply doesn't generate output.

Here's a snippet from our Spring configuration:

<jaxrs:server id="userServiceV2" address="/mobile/v2/users">
<jaxrs:serviceBeans>
<ref bean="userServiceMobile" />
</jaxrs:serviceBeans>
...
</jaxrs:server>

In this example, the address value -- /mobile/v2/users -- is here,
rather than in the class-level @Path annotation.

Any thoughts?

Thanks,
Steve

Stephane Epardaud

unread,
Mar 30, 2010, 9:18:20 AM3/30/10
to jax-d...@googlegroups.com
Hi,

I didn't know Spring didn't read the path from the JAX-RS annotations. Although this is not conforming to the specs, we should be able to add a workaround, but since I'm not using Spring I will need a bit of help, like example files and pointers to the doc of the Spring non-JAX-RS extensions.

RESTEasy does have a plugin for registering @Path annotated beans in Spring, did you know that?

Steve

unread,
Mar 30, 2010, 12:12:02 PM3/30/10
to jax-doclets
Hi Stephane,

Thanks for the quick reply. Our having part of the URI in the Spring
file is part convention (we've done it that way for a while) and part
necessity. For example, we use that part of the URI to define separate
versions (URIs) of a service, allowing us to use the same Java
implementation where possible.

Honestly, I'm not sure this is worth your effort. This situation is
probably not one that many teams using JAX-RS are likely to have. As
it happens, I've already got a doclet I wrote to generate our REST
refs (though it's very different: it generates XML, then uses XSLT to
get HTML). But I'd hoped to use someone else's. :)

I'd be happy to share more details about our situation and how I'd
thought about solving it.

Oh, and we're using CXF, rather than RESTEasy.

Thanks,
Steve

On Mar 30, 6:18 am, Stephane Epardaud <stephane.epard...@gmail.com>
wrote:

Reply all
Reply to author
Forward
0 new messages