jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: Convention Over Configuration

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Fri, 11 Mar 2011 17:35:10 +0100

Hi Bill,

On 03/11/2011 04:01 PM, Bill Burke wrote:
> How would you tell the difference between a sub resource locator and a @GET request if the HTTP method was determined by
> the method signature? I know I use getXXX() method signature names for some of my resource locator methods. I'm sure
> others do as well.

I tend to agree with this one.

> Also, if you were implicitly building URI mappings, how would you tell the different between an empty path "" and
> whether or not you wanted an implicit mapping. Define new annotations? -1.

We may consider approaching the default @Path annotation value in a way similar to the JSR250. That would introduce
requested convention over configuration at least to some extent. If one wants to instead configure the empty path "",
one would use @Path(""), same as today.

> I think adding any of this would greatly increase the risk of breaking existing applications.

Provided the @Path annotation does not have a default value in JAX-RS 1.x, what risk of breaking existing applications
do you see in this particular case?

Kind regards,
Marek