thymeleaf获取当前URL

2019-11-07  本文已影响0人  ljwheyxy

<div th:text="{#httpServletRequest.getRequestURL() +'?'+ #httpServletRequest.getQueryString() }"></div> <div th:text="{#httpServletRequest.requestURL +'?'+ #httpServletRequest.queryString }"></div>

httpServletRequest 标签还有很多相关的方法, 自己试试吧

上一篇 下一篇

猜你喜欢

热点阅读