In the first one I found annotations like @Path, @Get, @Post, @Consumes, and @Produces. All of them are describend in the javax.ws.rs package. On the second link I found similar - but different - annotations like @UriTemplate, @HttpMethod, @ConsumeMime and @ProduceMime.
Can anyone explain me why we've those similar annotations and which one I should use?
First of all, the universal truth about JAX-RS (JSR-311) can be found in the specification document available here:
http://jcp.org/en/jsr/detail?id=311 Second, regarding the annotations:
It seems like some of the annotations you mention are obsolete - perhaps their names have been changed.
The ones not in the specification are: @UriTemplate, @ConsumeMime and @ProduceMime.
The JAX-RS 1.1 specification contains an excellent summary of JAX-RS annotations in appendix A.
posted 10 years ago
it is always a pleasure when I answer (one of mine) questions. Thank's for the nice hint with the appendix A, that was the paper what I was looking for.