![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
thymeleaf
罗小树
这个作者很懒,什么都没留下…
展开
-
springboot thymeleaf向fragment中传入具体值
现在把html页面中的需要引入的js和css公共部分提取成一个模板,让其他页面在引入这个模板时,只要传入一个当前html的title即可。模板文件 commonHead.html<head th:fragment="head(title)"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /...原创 2018-06-18 14:44:20 · 5540 阅读 · 1 评论 -
springboot thymeleaf在前端设置全局变量让js取到
在使用jsp时,我们多会采用下面的方式来取到contextPath<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><% String path = request.getContextPath(); String basePath = request....原创 2018-06-18 15:56:26 · 14807 阅读 · 2 评论 -
springboot thymeleaf遍历List<Map>
一、问题描述现有如下数据,结构是List<Map<String,Object>>,并且Map中还嵌套了Map需要在页面上显示出来,效果如下:二、代码实现StudentController.java@Controller@RequestMapping("studentMgmt")public class StudentController { @RequestMa...原创 2018-06-18 20:26:19 · 60336 阅读 · 0 评论