thymeleaf @{
时间: 2023-10-13 16:03:35 浏览: 150
在Thymeleaf中,@{}用于生成URL链接或资源路径。它可以根据当前上下文自动添加上下文路径。例如,<a th:href="@{/user/login}"></a>会生成一个链接到/user/login的URL。而#{...}则用于消息表达式或资源表达式。例如,<a th:href="@{/login}" th:unless=${session.user != null}>Login</a>会根据session.user是否为空来判断是否显示登录链接。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [【详解】Thymeleaf中的基本表达式:@{},#{},${},*{}](https://blog.csdn.net/Sunshineoe/article/details/114595194)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Thymeleaf常用标签](https://blog.csdn.net/qq_35393693/article/details/79653402)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文