我想存储什么样的数据类型应该在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。 –