Last active
June 4, 2017 16:37
-
-
Save abhirockzz/76e7bf7a9326a34a06b5c0951f5a0e03 to your computer and use it in GitHub Desktop.
custom JAX-RS annotation decorated by @namebinding
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
@NameBinding | |
@Retention(RetentionPolicy.RUNTIME) | |
@Target({ElementType.TYPE, ElementType.METHOD}) | |
public @interface QueryParamValidator { | |
} |
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
@Path("test") | |
public class TestResource { | |
@GET | |
@QueryParamValidator | |
public String test(@QueryParam("p") String p){ | |
return "Param "+ p + " on " + new Date(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment