Hỏi & Đáp
안녕하세요. 지금 제가 다시 작성했는데 이번에는 됩니다... 차이점을 잘 모르겠습니다... // @GetMapping("hello") // public String hello(Model model) { // model.addAttribute("date", "hello!!"); // return "hello"; // } @GetMapping ( "hello" ) public String hello ( Model model ) { model . addAttribute ( "data" , "hello!!" ); return "hello" ; }
- Lượt thích
- 1
- Số bình luận
- 4
- Lượt xem
- 301
Hỏi & Đáp
넵 알겠습니다. package Hello.hellospring.Controller ; import org.springframework.stereotype. Controller ; import org.springframework.web.bind.annotation. GetMapping ; import org.springframework.ui. Model ; @Controller public class HelloController { @GetMapping ( "hello" ) public String hello ( Model model ) { model . addAttribute ( "date" , "hello!!" ); return "hello" ; } }
- Lượt thích
- 1
- Số bình luận
- 4
- Lượt xem
- 301