I bound the REST services / methods to the URI template using the @Path annotation. It looks as usual:
@GET @Path("/message") @Produces("application/json") public Response getMessage() { ... }
But my REST service must be case insensitive. Now I use regex in @Path in all my code:
@GET @Path("/{message:[mM][eE][sS][aA][gG][eE]}") @Produces("application/json") public Response getMessage() { ... }
It looks weird. Is there something that I overlooked in the spec (hopefully not, see this ) or has any JAX-RS feature for this feature? Now I am using JBoss RESTeasy .
Thanks.
java case-insensitive annotations jax-rs
mschayna
source share