Is there a way of escaping String templates?


#1

I have a syntax collision beetween kotlin and spring annotations:

@Value( "${jdbc.url}" )
private String jdbcUrl;
Is there a way of using this java annotation in kotlin escaping the ${jdbc.url} ?
Thanks,

#2

 

A simple  before the  make it working:</code></pre>&nbsp;&nbsp;<pre><code class="lang-kotlin">Value</span>(<span>"</span><span></span><span>{jdbc.url}")


Should be taken in account during a Java to Kotlin transformation??


#3

Please vote for https://youtrack.jetbrains.com/issue/KT-6800.


#4

During the import off the initial forum to Discourse, some characters were lost. There should be a ‘’:

@Value("\${jdbc.url}")