Thymeleaf对象的使用:日期对象
Thymeleaf在模板中使用 #dates 或 #calendars 两个对象来处理日期,这两个对象大部分类似。 开发环境:IntelliJ IDEA 2019.2.2 Spring Boot版本:2.1.8 开发环境:IntelliJ IDEA 2019.2.2 Spring Boot版本:2.1.8 新建一个名称为demo的Spring Boot项目。 1、pom.xml 加入Thymeleaf依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> 2、src/main/resources/application.yml 设置模板缓存为false,这样修改html页面后刷新浏览器能马上看到结果 spring: thymeleaf: cache: false 3、src/main/java/com/example/demo/TestController.java package com.example.demo; import org.springframework.stereotype.Controller; import org.springframework.ui