最近搜索

thymeleaf 操作session req application对象

浏览:609
管理员 2019-08-04 03:46

<span th:text="${session.ss}"></span>

全局对象使用这个也行

<title th:text="${application.config.webName}+'  管理系统' "></title>




<span th:text="${#httpSession.getAttribute('ss')}">session</span>

<span th:text="${#httpServletRequest.getAttribute('qq')}">req</span>

<span th:text="${#httpServletRequest.getServletContext().getAttribute('pp')}">application</span>

 


联系站长

站长微信:xiaomao0055

站长QQ:14496453