https://kotlinlang.org logo
Title
b

bjonnh

04/27/2019, 7:45 PM
Looks like the problem above is due to the constructor. There is something is spring data that doesn't like this class to have a constructor.
p

Pavlo Liapota

04/28/2019, 6:24 AM
I can guess that spring is using reflection and default constructor to create the instance. You second example doesn’t have default constructor and probably that’s why it doesn’t work.
b

bjonnh

04/28/2019, 4:27 PM
Someone else pointed to me that Spring hates final classes. I have to try using open classes on that.
n

nfrankel

04/28/2019, 9:51 PM
or use all-open plugin
s

Stephan Schroeder

04/29/2019, 10:58 AM
the spring-boot plugin opens all annoted classes (at least the @Service, @Component, @Repository ones. I’m not sure about @Document/SolrDocument)
b

bjonnh

04/29/2019, 8:03 PM
yep that's what I ended up using
seems to work