Escape @Value Spring Annotation in Kotlin

If you are using Spring annotations like 
in your Kotlin code, you might get compile-time errors like these

Error:Kotlin: [Internal Error] org.jetbrains.jet.utils.KotlinFrontEndException: Exception while analyzing expression at (16,14) in /Users/alex/my/project/loxal/rest-kit/src/main/kotlin/net/loxal/soa/restkit/client/RepositoryClient.kt:
Error:Kotlin: Compiler terminated with exit code: 2

because the ${blub} notation is also used by Kotlin for expression and literal resolution. So just add a backslash like
and everything is going to be alright. 


Popular posts from this blog

Tuning ext4 for performance with emphasis on SSD usage

How to fix: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu