Skip to content

Instantly share code, notes, and snippets.

@xstefank
Last active November 1, 2018 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xstefank/914614d8250cdc40c0047f55cff484a2 to your computer and use it in GitHub Desktop.
Save xstefank/914614d8250cdc40c0047f55cff484a2 to your computer and use it in GitHub Desktop.
Method stereotype usage in JAX-RS
package org.xstefank;
import javax.enterprise.inject.Produces;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
@Path("test")
public class TestResource {
@Path("get")
@GET
@TestStereotype
@Produces
public Response get() {
return Response.ok("get").build();
}
@Path("getSth")
@GET
@AnotherTestStereotype
@Produces
public Response getSth() {
return Response.ok("getSth").build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment