diff --git a/src/main/java/com/example/jerseyexercise/resources/yuna.java b/src/main/java/com/example/jerseyexercise/resources/yuna.java index 58653d3..904e2d2 100644 --- a/src/main/java/com/example/jerseyexercise/resources/yuna.java +++ b/src/main/java/com/example/jerseyexercise/resources/yuna.java @@ -42,4 +42,12 @@ public ArrayList getTweets(){ return tweetList; } + + @GET + @Path("/tweets/{no}") + @Produces(MediaType.APPLICATION_JSON) + public String getTweet(@PathParam("no") int n) { + String t = tweetList.get(n); + return t; + } }