The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
REST FIle
By Guest on 14th September 2022 02:40:19 AM | Syntax: TEXT | Views: 1



New paste | Download | Show/Hide line no. | Copy text to clipboard
  1. package com.jwt.rest;
  2.  
  3. import javax.ws.rs.GET;
  4. import javax.ws.rs.Path;
  5. import javax.ws.rs.PathParam;
  6. import javax.ws.rs.core.Response;
  7.   
  8. @Path("/hello")
  9. public class HelloWorldService {
  10.   
  11.     @GET
  12.     @Path("/{name}")
  13.     public Response getMsg(@PathParam("name") String name) {
  14.   
  15.         String output = "Welcome   : " + name;
  16.   
  17.         return Response.status(200).entity(output).build();
  18.   
  19.     }
  20.   
  21. }



  • Recent Pastes