Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. package com.example;
  2.  
  3. import org.springframework.stereotype.Controller;
  4. import org.springframework.web.bind.annotation.RequestMapping;
  5. import org.springframework.web.bind.annotation.ResponseBody;
  6. import org.springframework.web.bind.annotation.RestController;
  7.  
  8. //@RestController
  9. //public class DemoController {
  10. //
  11. //    @RequestMapping("/")
  12. //    public String hello() {
  13. //        return "Hello world";
  14. //    }
  15. //}
  16.  
  17. @Controller
  18. public class DemoController {
  19.  
  20.     @RequestMapping("/")
  21.     @ResponseBody
  22.     public String hello() {
  23.         return "Hello world2";
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement