1. View 에 input name값, action, method 확인

조건은
html 파일에 name 값 있는지 확인하러 가기
name이 없으면 데이터 전송이 안됨!!
post 요청을 해야함. db변경 할꺼니까!!
/join 식별자 요청

2. redirect 잘 되는지 확인
@Controller public class UserController { @PostMapping("/join") public String join(){ return "redirect:/loginForm"; }

3. 리다이렉션의 원리?
브라우저가 페이지를 요청 → 서버가 응답 : 헤더에 Location 키를 사용 → 값으로 '/main'을 전달 → 브라우저가 응답을 받음 → 헤더확인) HTTP 상태 코드 : 302 (임시적인 리다이렉션이 일어났음을 알림) → 브라우저는 새로운 주소로 재 요청 → 해당 주소에 대한 서버의 응답을 받음



@GetMapping 어노테이션을 사용하여 여러 개의 URL 경로를 매핑할 때에는 중괄호 {}를 사용하여 경로를 나열해야 합니다.
Share article