Created
November 2, 2018 10:11
-
-
Save xstefank/6893d8c9461dd21e1a80e7837fc3492a to your computer and use it in GitHub Desktop.
Stereotypes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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