https://kotlinlang.org logo
Title
a

anli

04/24/2018, 9:39 AM
Hi! Home made (but not by me) annotation results in
lateinit modifier is not allowed on extension properties
error. How to resolve?
g

gildor

04/24/2018, 9:41 AM
You cannot use lateinit for extension property
a

anli

04/24/2018, 10:08 AM
So how to autowire an instance which in Java is wired with
\@SomeAnnotation
  private SomeService someService;
? And I can not use constructor argument list for it.
g

gildor

04/24/2018, 10:10 AM
I don’t think that this message related on it, looks like someone created extension property with
lateinit
modifier
a

anli

04/24/2018, 11:33 AM
So what is the Kotlin way to permit Spring application container to wire a property in accordance with given annotation the container is aware of? (Spring 4.x)
g

gildor

04/24/2018, 12:26 PM
I’m not familiar with spring, first of all you shouldn’t use extension properties for that, only member properties, if you would provide some sample code maybe someonce could help, also maybe #spring is good place to ask