I\'m playing around with Jersey 2.21 and I\'d like to know if it\'s possible to have an \"optional\" param which can, or not, be present in the request made to
Jersey 2.21
There is a way easier way to do this:
@GET @Path("myMethod/{id}") public String myMethod(@PathParam("id") Integer id) { } @GET @Path("myMethod") public String myMethod() { return myMethod(null); }
No tricky regex required.