작성
·
170
0
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Fri Aug 26 14:10:46 KST 2022
There was an unexpected error (type=Internal Server Error, status=500).
정적 index.html 은 잘 찾아가는데
hello-mvc는 찾아가질 못하네요
Controller 소스코드
package hello.hellospring.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;
@Controller
public class HelloController {
@GetMapping("hello")
public String hello(Model model) {
model.addAttribute("data", "hello!!");
return "hello";
}
@GetMapping("hello-mvc")
public String helloMvc(@RequestParam("name") String name, Model model) {
model.addAttribute("name", name);
return "hello-template";
}
}