- @GetMapping(""): 들어 갈 URL 값
- @ResponseBody: 페이지에 return 값이 보여진다.
- @RequestMapping("") 을 통해 나머지 메서드매핑 앞에 리퀘스트매핑 URL 값이 따라붙는다.(URL 프리픽스(prefix))
- @RequiredArgsConstructo: final 키워드 객체 생성자 자동 호출(DI)
// http://localhost:8080/ -> 기본주소 값을 입력해도 return 값 안에 있는 주소로 안내해준다
@GetMapping("/")
public String root() {
return "redirect:/question/list";
}