We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2f09bc commit 408b3f7Copy full SHA for 408b3f7
src/main/java/os/expert/sample/GoalResource.java
@@ -2,6 +2,7 @@
2
3
4
import jakarta.inject.Inject;
5
+import jakarta.ws.rs.DefaultValue;
6
import jakarta.ws.rs.GET;
7
import jakarta.ws.rs.PUT;
8
import jakarta.ws.rs.Path;
@@ -28,7 +29,8 @@ public GoalResource(GoalService goalService) {
28
29
}
30
31
@GET
- public List<Goal> goals(@QueryParam("page") int page,@QueryParam("size") int size) {
32
+ public List<Goal> goals(@QueryParam("page") @DefaultValue("1") int page,
33
+ @QueryParam("size") @DefaultValue("10") int size) {
34
LOGGER.info("Listing goals, page: " + page + ", size: " + size);
35
return goalService.findGoals(page, size);
36
0 commit comments