헤더에서 path를 읽어서 연결 확인
→ 핸들러(리퀘스트의 path에 따른 요청처리 메소드)
@GetMapping("/html")
public String hello() {
}
RequestHanlderMappings
- RequestHanlderMapping
- "/hello"
- "/bye"
- "Get:/user?userId=1" -> UserController.readUser(Long userId)
- "Post:/user" -> UserController.createUser(User user)
body
<form>
<input name value="새로운사용자"/>
</form>
Body를 읽어야 함
GET이 아닌 POST일 경우 BODY를 읽어야 한다.
(로그인)시큐리티 처럼 만들어봐도 괜찮지 않을까?