Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.ResponseBody;
- import org.springframework.web.bind.annotation.RestController;
- //@RestController
- //public class DemoController {
- //
- // @RequestMapping("/")
- // public String hello() {
- // return "Hello world";
- // }
- //}
- @Controller
- public class DemoController {
- @RequestMapping("/")
- @ResponseBody
- public String hello() {
- return "Hello world2";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement