I am trying to initialise a list of properties from a YAML file in a Spring Boot project with Kotlin.
It works fine for a normal string, but fails when I try to init a List with the following error:
Unexpected exception during bean creation; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'foo.bars' in value "${foo.bars}"
The Kotlin code has the following constructor argument
@Value("\${foo.bars}")
val foobars: List<String>
the yaml file has the following values:
foo:
bars:
- test1
- test2
Do I need to do something different between Lists and normal Strings?