thymeleaf+spring boot 页面hashmap取值
2017-06-26 10:44
295 查看
1,controller 返回代码片段
2,thymeleatf 页面取值
<td><span th:text="${userNames[__${corp.creator}__]}"></span></td>
List<CliUser> cliUsers = cliUserService.findByIds(userIds); if (cliUsers != null) { Map<Integer, String> userNames = new HashMap<>(cliUsers.size()); for (CliUser user : cliUsers) { userNames.put(user.getId(), user.getName()); } model.addAttribute("userNames", userNames); }
2,thymeleatf 页面取值
<td><span th:text="${userNames[__${corp.creator}__]}"></span></td>
相关文章推荐
- spring boot使用thymeleaf跳转页面实例代码
- springboot学习(4)springboot使用thymeleaf完成数据的页面展示
- 微服务,微架构[十一]springboot模板页面thymeleaf
- 访问不存在的Thymeleaf 资源时使页面转向 404,而不是500 (Spring Boot)
- springboot开发日志(4): thymeleaf模板 自定义404和500页面
- [spring boot][thymeleaf]spring boot 1.5+ 页面无法找到
- Spring Boot---(16)Spring Boot使用Thymeleaf开发web页面
- springboot-thymeleaf(html页面跳转)
- SpringBoot+thymeleaf项目页面的一些问题
- thymeleaf :springboot整合mybatis的web项目中使用html而不是jsp当页面渲染
- springboot中thymeleaf页面处理
- springboot 常用两种图形形式(thymeleaf模板,jsp页面)
- SpringBoot thymeleaf模板页面没提示,SpringBoot thymeleaf模板插件安装
- [spring boot] 用 thymeleaf模板开发html页面
- springboot 使用 thymeleaf 模板引擎。在页面写隐藏域接收后台的值。在页面进行对话框提示。
- spring boot与thymeleaf页面传参两种方式
- spring boot+spring security+thymeleaf在页面上判断用户是否登录
- spring boot系列 - thymeleaf跳转页面
- springboot如何使用thymeleaf模板访问html页面
- springboot-10-前端页面整合, thymeleaf, freemarker, jsp 模板使用