Restful service with springboot - Java:
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloWorld {
/**
* This method return a String with the message "Hello World".
* @return String Obtains the message "Hello World".
*/
@RequestMapping(value = "/hello", method = RequestMethod.GET)
public String hello() {
return "Hello World";
}
}
Top comments (0)