java Postgres点类型列到Spring实体数据类型
我有一张postgres表:
CREATE TABLE public.geometry
(
id serial not null primary key,
coordinates point not null
);
我正在尝试从使用Spring的服务器中检索一行作为JSON响应API,其类如下:
@Entity
@Table(name = "geometry",schema = "public")
@JsonIdentityInfo(generator=RefIntSequenceGenerator.class)
public class Cylinder
{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", columnDefinition = "serial", updatable = false, nullable = false)
@NotNull
private long id;
@NotNull
private Point coordinates;
public long getId()
{
return id;
}
public Point getCoordinates() {
return coordinates;
}
}
但当我试图接近终点时,我得到:
could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize
共 (0) 个答案