Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. package com.pig.rest.webservices.restfulwebservices;
  2.  
  3. import org.springframework.web.bind.annotation.RequestMapping;
  4. import org.springframework.web.bind.annotation.RequestMethod;
  5. import org.springframework.web.bind.annotation.RestController;
  6.  
  7. //Controller
  8. @RestController
  9. public class HelloWorldController {
  10. // GET
  11. // URI - /hello-world
  12. // method - "Hello World"
  13. @RequestMapping(method=RequestMethod.GET,path="/hello-world")
  14. public String helloWorld() {
  15. return "Hello World";
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement