csrf: 사용자도 모르게 서버에 강제로 요청을 보내는 해킹 방식
application.properties
# mustache csrf token 받을 수 있게 함
spring.mustache.servlet.expose-request-attributes=true
login.mustache
<body>
login page
<hr>
<form action="/loginProc" method="post" name="loginForm">
<input id="username" type="text" name="username" placeholder="id" />
<input id="password" type="password" name="password" placeholder="password" />
<input type="hidden" name="_csrf" value="{{_csrf.token}}" /> -> csrf 토큰 생성
<input type="submit" value="login"/>
</form>
</body>