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>

  

猜你喜欢

转载自www.cnblogs.com/max-hou/p/11111340.html