malteseduck / spring-data-marklogic

An implementation of the Spring Data interfaces for the MarkLogic NoSQL database
Apache License 2.0
7 stars 9 forks source link

JacksonConverter can't handle Kotlin data classes that don't have defaults #38

Closed malteseduck closed 6 years ago

malteseduck commented 6 years ago

In Kotlin if you have default values for all params in the constructor then it generates a default constructor. If not, it doesn't, which is ok for your code since it makes "required" fields, but bad for Jackson unless you use jackson-module-kotlin.

Register the KotlinModule() when it is on the classpath so that Jackson can handle these objects.