Be careful here: it is not equivalent.So for example, we can restrict a method by restricting it's URL which is equivalent to the statement "role based security on a method"
Check this example:
Code: Select all
@Path("convert")
public class RunningConverter extends MyJAXRS_Classes {
@GET
@Produces("text/plain")
public String getPlainTextResultTimeInSeconds(@QueryParam("me") double metres,
@QueryParam("km") double kmPerHour) {
// implementation
}
@GET
@Produces("text/html")
public String getHTMLResultTimeInSeconds(@QueryParam("me") double metres,
@QueryParam("km") double kmPerHour) {
// implementation
}
}
Regards,
Frits