Spring 数据 mongo 无法保存未找到 属性 类型的 GeoData b/c
Spring data mongo can't save GeoData b/c of No property type found
尝试使用 geoData spring 数据更新对象时 mongo 抛出 ff 异常
org.springframework.data.mapping.context.InvalidPersistentPropertyPath: No property type found on org.springframework.data.mongodb.core.geo.GeoJsonGeometryCollection!
示例对象结构如下
class Location{
....
@GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE)
GeoJsonGeometryCollection geomerty
}
存储库
interface LocationRepository extends MongoRepository<Location, String> {
}
保存方法(更新时调用)
//the exception is thrown here
locationRepository.save(updatedLocation)
我没有添加类型字段,它是由 GeoJsonGeometryCollection conveter 添加的。
欢迎任何解决方法。
当我将 spring 引导版本从 1.3 升级到 1.4 时它开始工作
尝试使用 geoData spring 数据更新对象时 mongo 抛出 ff 异常
org.springframework.data.mapping.context.InvalidPersistentPropertyPath: No property type found on org.springframework.data.mongodb.core.geo.GeoJsonGeometryCollection!
示例对象结构如下
class Location{
....
@GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE)
GeoJsonGeometryCollection geomerty
}
存储库
interface LocationRepository extends MongoRepository<Location, String> {
}
保存方法(更新时调用)
//the exception is thrown here
locationRepository.save(updatedLocation)
我没有添加类型字段,它是由 GeoJsonGeometryCollection conveter 添加的。
欢迎任何解决方法。
当我将 spring 引导版本从 1.3 升级到 1.4 时它开始工作