Tanggal Format REST DATA SPRING

import java.sql.Date;
import java.sql.Time;
@Entity
public class Order{
  //format time
  @JsonFormat(pattern="HH:mm:ss")
  private Time orderTime;
  //forma date
  @JsonFormat(pattern="yyyy-MM-dd")
  private Date orderDate;
}
//if you are using spring data rest you can send a POST request like this
/*
{
  "orderTime":"20:00:00",
  "orderDate":"2022-01-01"
}
*/
Happy conding (●'◡'●) 
Wa7ch Tennin