Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.pig.rest.webservices.restfulwebservices;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import org.springframework.web.bind.annotation.RestController;
- //Controller
- @RestController
- public class HelloWorldController {
- // GET
- // URI - /hello-world
- // method - "Hello World"
- @RequestMapping(method=RequestMethod.GET,path="/hello-world")
- public String helloWorld() {
- return "Hello World";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement