无法使用构造函数NO_CONSTRUCTOR实例化org.springframework.data.mongodb.core.geo.GeoJson

时间:2018-06-04 16:01:52

标签: mongodb geospatial spring-data-mongodb

使用案例:我想将Point和Multipoint存储在同一个字段中。所以我在课堂上使用GeoGson接口:

@Id
private String id;
@Indexed(unique=true)
private int refk;
@GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE)
private GeoJson loc;

有了这个,我可以在同一个字段中保存Point和multipoint。 但是,当我查询文件时,它给了我错误:

Failed to instantiate org.springframework.data.mongodb.core.geo.GeoJson using constructor NO_CONSTRUCTOR

0 个答案:

没有答案
相关问题