Thymeleaf 문법
2024. 3. 16. 03:37ㆍJava/Spring Framework
일반적인 css 참조 문법
<link href="./vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="./vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="./customized/project.css" rel="stylesheet">
타임리프에서 css 참조 문법
<link th:href="@{/vendors/bootstrap/dist/css/bootstrap.min.css}" rel="stylesheet">
<link th:href="@{/vendors/font-awesome/css/font-awesome.min.css}" rel="stylesheet">
<link th:href="@{/vendors/nprogress/nprogress.css}" rel="stylesheet">
일반적인 js 참조 문법
<script src="/vendors/jquery/dist/jquery.min.js"></script>
<script src="/vendors/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="/vendors/fastclick/lib/fastclick.js"></script>
<script src="/vendors/nprogress/nprogress.js"></script>
타임리프에서 js 참조 문법
<script th:src="@{/vendors/jquery/dist/jquery.min.js}"></script>
<script th:src="@{/vendors/bootstrap/dist/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/vendors/fastclick/lib/fastclick.js}"></script>
<script th:src="@{/vendors/nprogress/nprogress.js}"></script>
참고 문서 :
'Java > Spring Framework' 카테고리의 다른 글
java.net.URLDecoder (0) | 2023.10.30 |
---|---|
스프링 부트 2.4.1 (0) | 2023.04.05 |
RedisTemplate - Spring 에서 \xaa 문자 안들어가게 하는 방법 (0) | 2023.04.05 |