我有一個Location
實體,它在Spring引導和彈簧數據中具有類型org.springframework.data.elasticsearch.core.geo.GeoPoint
的屬性-elasticsearch項目如下:引起:org.hibernate.MappingException:無法確定類型爲:org.springframework.data.elasticsearch.core.geo.GeoPoint
@Entity
@Table(name = "location")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "location")
public class Location implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@NotNull
@Column(name = "name", nullable = false)
private String name;
@NotNull
@Column(name = "country", nullable = false)
private String country;
@GeoPointField
private GeoPoint location;
...
但是,當我啓動應用程序時,hibernate會拋出Caused by: org.hibernate.MappingException: Could not determine type for: org.springframework.data.elasticsearch.core.geo.GeoPoint
。任何方式來解決這個問題?