I remember from some time ago `@Value("\${provider...
# spring
c
I remember from some time ago
@Value("\${provider.url:}") lateinit var urlString: String
worked.
q
maybe i'v got
UninitializedPropertyAccessException
cose i call
urlString
outside? : P().urlString
c
Of course, `@Value`s are set by Spring, in
P().urlString
you create instance of
P
manually, without help of Spring, so nothing initializes
urlString
q
but how i can use it outside of class
that was a Q
c
I believe at the moment you can't. Well, in fact you can if you're willing to play dirty, research
ContextLoader.getCurrentWebApplicationContext()