https://kotlinlang.org logo
#spring
Title
# spring
c

corneil

08/12/2019, 2:44 PM
I've create a project to reproduce the issue: https://github.com/corneil/spring-spel-kotlin-test
s

sdeleuze

08/12/2019, 2:53 PM
Thanks I will have a look
c

corneil

08/12/2019, 2:54 PM
Thanks.
val output = expression.getValue(context, root, String::class.java)
This works. Seems like the
String::class
was the problem
s

sdeleuze

08/12/2019, 2:59 PM
Ok, feel free to check with the new doc
I think I provided the right version
But feel free to double check
c

corneil

08/12/2019, 3:00 PM
Your docs look nice
It also seems that you can reference a property in map by name it has to be a subscript:
val exp = "properties['name'] + ':Extra:' + properties['value1'] + ':' + properties['value2']"
What do I need to do if I want to access map items like normal properties? Doesn't the MapAccessor do that?
I create a
PropertyAccessor
that does the job
3 Views