Created
March 21, 2012 20:58
-
-
Save stoicflame/2152787 to your computer and use it in GitHub Desktop.
JAX-RS example with @DefaultValue
This file contains hidden or 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("/path/to/my/changes") | |
public class ChangeHistoryResource { | |
public static final String START_DEFAULT = "0"; | |
public static final String COUNT_DEFAULT = "100"; | |
... | |
public ChangeListOrWhateverItsCalled getChangeList(@QueryParam("start") @DefaultValue(START_DEFAULT) String start, | |
@QueryParam("count") @DefaultValue(COUNT_DEFAULT) Integer count) { | |
//implementation | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment