Reputation: 93
I'm trying to migrate the way my resources are named, from Portuguese (and singular) to English (and plural), and I was wondering if Jersey currently supports multiple @Paths for the same resource, so I could make this transition painless to the users of my system.
From:
@Path("/usuario")
public class UsersResource {
@POST
public Response create(User user) {
...
}
}
To:
@Path("/users")
public class UsersResource {
@POST
public Response create(User user) {
...
}
}
Would really appreciate if someone could help me with this.
Cheers!
Upvotes: 4
Views: 2005
Reputation: 1097
Yes, there is a way to work with multiple paths:
@Path("/{parameter: path1|path2}")
Upvotes: 9