Hackerss.com is a community of amazing hackers

Hackerss is a community for developers, data scientitst, ethical hackers, hardware enthusiasts or any person that want to learn / share their knowledge of any aspect of digital technology.

Create account Log in

Posted on

Restful service with springboot in Java

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;

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";

Enter fullscreen mode Exit fullscreen mode

Top comments (0)