zoukankan      html  css  js  c++  java
  • thymeleaf 页面获取当前页面的完整URL地址

    下面两种方法是一样的

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

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

    原创文章,欢迎转载,转载请注明出处!

  • 相关阅读:
    CSS
    CSS
    CSS
    CSS
    CSS
    CSS
    FLASK
    人物
    关于反射
    释放c盘空间
  • 原文地址:https://www.cnblogs.com/acm-bingzi/p/thymeleaf_url.html
Copyright © 2011-2022 走看看