package com.kwan.springbootkwan.entity; import com.fasterxml.jackson.annotation.JsonFormat; import java.util.Date; public class Person { private String name; private Integer age; @JsonFormat(pattern = "yyyy-MM-dd") private Date birthday; public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } }