@Path and regular expression (Jersey/REST)
- by Castanho
Hi there!
I'm using Jersey in a REST project and I'm needing to use regular expression.
Digging about it is simple like:
@Path("/resources)
public class MyResource {
@GET
@Path("{subResources:.*}/bar")
public String get() {...}
}
But, I'm only capable of using regex if in my @Path contains a variable or text value, example:
@Path("{SubResource1}/{subResources:.*}/bar")
Or
@Path("hardCodeString/{subResources:.*}/bar")
Today I could run with this solution of a variable, but is not oK for my perspective.
Question
Does anyone have worked with something related?
I'm doing something wrong?
I think that this could be a bug, when working with more then one @Path, one in the Class and other in the Method.
Any tips is appreciated!
Regards