且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Spring Boot中反序列化/序列化Geometry类型?

更新时间:2022-04-25 00:24:12

您正在使用空间数据类型,因此需要包含以下依赖项才能工作

You're using Spatial data types, so need to include below dependency to work

<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-spatial</artifactId>
</dependency>

并相应地更改方言,例如org.hibernate.spatial.dialect.mysql.MySQL56InnoDBSpatialDialect

And change dialect accordingly e.g. org.hibernate.spatial.dialect.mysql.MySQL56InnoDBSpatialDialect

请参见空间数据类型