I am running into a problem when using spring data mongodb togheter with kotlin. When i try to read objects from mongodb, i get an error complaining that my data classes don't have a default no-args constructor. I can solve this by giving every field a value in my data class, so the compiler will generate a default no-args constructor. Off course i don't really want to do this.
I know there is a jackson kotlin module and it is included in my maven file. It works for deserializing objects that i get over http, so i know that spring picks it up. It seems however that spring data mongodb doesn't use the jackson objectmapper?
Is there a way i can use the jackson objectmapper in spring data mongodb or fix the problem of not having a non args constructor?