게시글
질문&답변
2021.07.08
똑같이 한거 같은데 404 오류가 뜨네요..
감사합니다... controller 폴더를 hello.hellospring폴더 바깥에 만들어버렸네요
- 0
- 3
- 868
질문&답변
2021.07.07
똑같이 한거 같은데 404 오류가 뜨네요..
package controller;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.RequestParam;@Controllerpublic class HelloController { @GetMapping("hello-mvc") public String helloMvc(@RequestParam("name") String name, Model model) { model.addAttribute("name", name); return "hello-template"; }}//HelloController xmlns:th="http://www.thymeleaf.org">th:text="'hello ' + ${name}">hello! empty//hello-template.html
- 0
- 3
- 868