diff --git a/services/HelloWorld.java b/services/HelloWorld.java index 9d2d934cb091585e822a7b0dd8c1299c21115543..da6343297b3c15ecba8f32e2abb49875250bc679 100644 --- a/services/HelloWorld.java +++ b/services/HelloWorld.java @@ -2,6 +2,7 @@ package services; import javax.ws.rs.GET; import javax.ws.rs.Path; +import javax.ws.rs.PathParam; import javax.ws.rs.Produces; @Path("/helloworld") @@ -15,6 +16,15 @@ public class HelloWorld { } + @GET + @Path("{name}") + @Produces("text/plain") + public String helloWorldName(@PathParam("name") String name){ + + return "Hello, "+name+"!"; + + } + @GET @Produces("application/json") public String helloWorld2(){