我想存儲什麼樣的數據類型應該在Spring框架中使用的時間? 我使用的數據庫是MySQLSpring-Data-Rest中的時間的數據類型
@Entity
public class ShopDetail {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private String address;
private Double latitude;
private Double longitude;
private float rating;
private Time openingTime;
private Time closingTime;
}
java.util.date或java.sql.date – fg78nc
[@Temporal](http://docs.oracle.com/javaee/7/api/javax/persistence/Temporal.html)註釋用於指定當前註釋的java.util.Date或java.util.Calendar實體屬性的TemporalType。 –