What is the JSON format to pass POINT data type values?

587 Views Asked by At

I am using Java, Spring boot, MySQL and data JPA. Check my code here

@Column(name = "point", columnDefinition = "POINT")
private Point point;

And in my application.properties file, I've Added

spring.jpa.properties.hibernate.dialect = org.hibernate.spatial.dialect.mysql.MySQL56SpatialDialect

While passing a JSON like "point": "51.61100420, -0.10213410" I'm getting this error

> "JSON parse error: Cannot construct instance of org.springframework.data.geo.Point (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('(51.61100420, -0.10213410)'); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of org.springframework.data.geo.Point (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('(51.61100420, -0.10213410)')\n at [Source: (PushbackInputStream); line: 11, column: 12]

Please help me with this, Thanks in advance

0

There are 0 best solutions below