Hi,
I'm using Jersey 1.13 and I want to configure my resources to match on
multiple path segments. I have been able to get this to work by
configuring my resource thusly:
@Path("/foo")
class SomeResource {
@Path("/{path:.+}/bar")
def method1(@PathParam("path") space:String) = {
// do something here
}
@Path("/{path:.+}/baz")
def method2(@PathParam("path") space:String) = {
// do something here
}
}
However, I'd like pull the {path:.+} match up to the class level, e.g.:
@Path("/foo/{path:.+}")
class SomeResource {
@Path("/bar")
def method1(@PathParam("path") space:String) = {
// do something here
}
@Path("/baz")
def method2(@PathParam("path") space:String) = {
// do something here
}
}
When I do the latter, Jersey fails to match the route and returns a 405.
Is there something I'm doing wrong here?
Cheers,
Ben