IDE
[브라우저 요청]
↓
[Controller]
↓
HttpServletRequest → getSession(true) → 세션 없으면 생성
↓
session.setAttribute("sessionKey", memberId)
↓
세션 저장소: { sessionId=abc123, sessionKey=5 }
클라이언트-서버
[로그인 요청]
↓
Spring 서버: 세션 생성 + "sessionKey" 저장
↓
응답 헤더에 Set-Cookie: JSESSIONID=abc123
↓
브라우저: JSESSIONID 쿠키 저장
[다음 요청부터]
↓
요청 헤더에 Cookie: JSESSIONID=abc123
↓
Spring 서버: 해당 세션 찾아서 로그인 상태 유지