Use o tymeleaf Variable em JavaScript
<script th:inline="javascript"> // Enable Thymeleaf inlining
var email = [[${user.email}]]; // Behaves just like in HTML
</script>
Odd Oyster