百度

Spring 使用日期类型

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>

  

posted @ 2019-06-30 21:36  麦克斯-侯  阅读(398)  评论(0)    收藏  举报
百度