-
Notifications
You must be signed in to change notification settings - Fork 210
Spring Boot Language Server processing java.util.Properties type configuration logic error #534
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I can reproduce this issue. Steps:
=> error shown on the text between This is definitely something we should fix. However for this particular example it seems like the '[..]' notation while it is indeed 'valid' and shouldn't be flagged as an error... is actually not necessary. I create a property class myself to test this out:
And I made my app read these properties and print them out to test how they get bound. When I create a properties file like this:
The 'stuff' properties object gets populated with a map entry of Anyhow long story short:
However, I am a little confused with comments from the other bug ticket. These suggest that using the Maybe @wilkinsona can clarify. Also I wonder if this behavior might vary on different versions of Spring Boot (I am trying this with Boot 2.4.M2 and there escaping the |
Okay, so switching my test app to Boot 2.2.8... and indeed in that case escaping is necessary. Without escaping the key becomes |
See: #534 Signed-off-by: Kris De Volder <kdevolder@pivotal.io>
(comment in Pivotal Tracker added by Kris De Volder:) Follow up ticket: https://www.pivotaltracker.com/story/show/174872660 I think we have similar issue in .yml and also the conversion from .properties to yml. |
(comment in Pivotal Tracker added by Nieraj Singh:) Accepted using: Version: 4.8.1.CI-B2455 |
Problem
Configure the property name
spring.datasource.hikari.data-source-properties[v$session.program]=myapp
in application.properties.But problem is that the spring boot language server prompts an error
Can't use '[..]' navigation for property 'spring.datasource.hikari.data-source-properties' of type java.util.Properties
.Environment
Spring Boot: 2.2.8.RELEASE
Oracle JDK: 1.8.0_192
Eclipse: 2020-06 (4.16.0)
Spring Boot Language Server: 4.7.2.202009020949
Related issue
https://github.com/spring-projects/spring-boot/issues/23238
The text was updated successfully, but these errors were encountered: