컨트롤러 코드 중
@GetMapping("/test1")
String test1(@RequestParam String name){
System.out.println(name);
return "redirect:/list";
}
위와 같은 코드가 있는데요. http://localhost:8080/test1를 입력하면 아래와 같은 에러가 나옵니다.
에러페이지임
400
Bad Request
/test1
Required parameter 'name' is not present.
http://localhost:8080/list에서 버튼을 클릭하면 name이 잘출력되는데요. 왜그런건가요?