MapleStory Finger Point

๐ŸŸค JAVA/๐ŸŸค Spring

[SpringBoot] thymeleaf ํƒ€์ž„๋ฆฌํ”„ - ๋‚ด์žฅ๊ฐ์ฒด

HYEJU01 2024. 8. 26. 22:29
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


    <h3>ํƒ€์ž„๋ฆฌํ”„ ๋‚ด์žฅ๊ฐ์ฒด ์‚ฌ์šฉ๋ฐฉ๋ฒ•</h3>

    ๋ฐฐ์—ด์˜ ๊ธธ์ด
    [[${ #arrays.length(arr) }]]

    <br>
    ๋ฆฌ์ŠคํŠธ์˜ ๊ธธ์ด
    [[${ #lists.size(list) }]]

    <br>
    ๋นˆ๋ฆฌ์ŠคํŠธ ํ™•์ธ
    [[${ #lists.isEmpty(list) }]]

    <br>
    [[${now}]]

    <br>
    [[${ #dates.format(now, 'yyyy-MM-dd') }]]





    <h3>์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋กœ ๊ฐ’ ๋ฐ›๊ธฐ</h3>

    <script th:inline="javascript">

        var name = '[[${name}]]';
        var arr = '[[${arr}]]';
        var vo = '[[${vo}]]';

        console.log(name);
        console.log(arr);
        console.log(vo);

        console.log( JSON.parse(vo) );


    </script>


</body>
</html>