1. 数据层数据类型依赖包 java.time.LocalDate
2.pom.xml添加依赖
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-java8time</artifactId>
</dependency>
3.日期类型如何在列表(详情)中显示
<td th:text="*{#temporals.format(user.dateOfBirth, 'yyyy-MM-dd')}"></td>