thymeleaf 获取项目路径

<p th:text=${salecode}></p>

<a th:href="${#httpServletRequest.getScheme()+'://'+#httpServletRequest.getServerName()+':'+#httpServletRequest.getServerPort()+#httpServletRequest.getContextPath()+'/icon/'+salecode } "
></a>

效果图如下:

自己当笔记用,不给坏人用

猜你喜欢

转载自www.cnblogs.com/1246447850qqcom/p/9714869.html
今日推荐