ex..
@GetMapping("/joinIdDupChk")
public String joinIdDupChk(String id, Model model) {
int rowCount = memberService.getCountById(id);
boolean isIdDup = (rowCount == 1) ? true : false;
// model 객체에 View(JSP)에서 사용할 데이터를 저장하기
// 스프링이 request.setAttribute(키, 값); 호출로 옮겨줌model.addAttribute("isIdDup",isIdDup);
model.addAttribute("id",id);
return "member/joinIdDupChk";
}
모델 인터페이스를 임포트해서 모델 객체에 넣어주면 자동으로 request에 스프링이 넣어준다