From 484d8f65e03ef26075d50d18e8734f6480c4cc50 Mon Sep 17 00:00:00 2001 From: civitarese Date: Thu, 11 Apr 2019 23:11:31 +0200 Subject: [PATCH] Aggiunto endpoint --- services/HelloWorld.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/HelloWorld.java b/services/HelloWorld.java index 9d2d934..da63432 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(){ -- 2.18.1