Skip to content

Instantly share code, notes, and snippets.

@xstefank
Created November 2, 2018 10:11
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/6893d8c9461dd21e1a80e7837fc3492a to your computer and use it in GitHub Desktop.
Save xstefank/6893d8c9461dd21e1a80e7837fc3492a to your computer and use it in GitHub Desktop.
Stereotypes.java
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.TEXT_PLAIN)
@Encoded
@Stereotype
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface TestStereotype {
}
@Path("/resource1")
@TestStereotype
public class Resource1 {
...
}
@Path("/resource2")
@TestStereotype
public class Resource2 {
...
}
\\ instead of
@Path("/resource1")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.TEXT_PLAIN)
@Encoded
public class Resource1 {
...
}
@Path("/resource2")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.TEXT_PLAIN)
@Encoded
public class Resource2 {
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment