在我的数据库中,当我尝试从Spring Boot中使用rest api获取数据时,我使用的是几何字段数据类型,但是当我运行该api错误时显示如下所示
Servlet.service() for servlet [dispatcherServlet] in context with path [/anju] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize] with root cause
java.io.StreamCorruptedException:无效的流标头:30313031
我的实体就是这样
@Entity
@Table(name ="data")
public class LatlngEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Integer id;
@Column(name = "geom", columnDefinition = "GEOMETRY")
private Point geom;
@Column(name = "longitude", length = 50, nullable = false)
private String longitude;
我该如何解决这个问题,好像是从几何实体反序列化问题,请帮助我,谢谢