Building an Application with Spring Boot :: Learn how to build an application with minimal configuration. https://spring.io/guides/gs/spring-boot/

HelloController.java 344B

12345678910111213141516
  1. package hello;
  2. import org.springframework.stereotype.Controller;
  3. import org.springframework.web.bind.annotation.RequestMapping;
  4. import org.springframework.web.bind.annotation.ResponseBody;
  5. @Controller
  6. public class HelloController {
  7. @RequestMapping("/")
  8. public @ResponseBody String index() {
  9. return "Greetings from Spring Boot!";
  10. }
  11. }