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

[jsr339-experts] Re: Convention Over Configuration

From: Markus KARG <markus_at_headcrashing.eu>
Date: Mon, 14 Mar 2011 19:10:22 +0100

Yes, I noticed that too late.

> -----Original Message-----
> From: Marek Potociar [mailto:marek.potociar_at_oracle.com]
> Sent: Montag, 14. März 2011 18:20
> To: jsr339-experts_at_jax-rs-spec.java.net
> Cc: Markus KARG
> Subject: Re: [jsr339-experts] Re: Convention Over Configuration
>
> Hi Markus,
>
> On 03/12/2011 09:43 AM, Markus KARG wrote:
> >>> 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?
> >> For resource paths its ok, I just don't like conventions like this.
> >
> > As far as I understood his request it was *solely* about @Path,
> wasn't it (maybe I missed where he suggested others)?
>
> In the end there was also a suggestion to make resource method
> annotations (e.g. @GET ) optional (see bellow).
>
> Marek
>
> > On 3/11/11 2:49 AM, Adam Bien wrote:
> > >>
> > >> Hi Guilherme,
> > >>
> > >> you mean:
> > >>
> >>>> >>>>> @Path("something")
> >>>> >>>>> @GET
> >>>> >>>>> public Response something(...
> >>>> >>>>>
> >>>> >>>>> @Path("something")
> >>>> >>>>> class SomethingResource {
> >>>> >>>>> }
> > >>
> > >> should be
> > >>
> > >>
> > >> @Path
> > >> public Response something
> > >>
> > >> and
> > >>
> > >> @Path
> > >> class SomethingResource ?
> > >>
> > >>
> > >> Then +1. I get questions in every workshop, why we have to specify
> that
> > >> redundantly. We cannot go to far, because a JAX-Resource can be
> also an EJB
> > >> or managed bean at the same time.
> > >>
> > >> In general - we should minimize the total amount of required
> annotations.
> > >>