-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constructor-based configuration property binding fails silently when parameter name information is not available #16928
Comments
Thanks for the sample. Unfortunately, I haven't been able to reproduce the behaviour that you have described. Here's the output from running
As you can see, Can you please describe the steps that must be taken with the sample to reproduce the behaviour that you have described? |
Hi @thekalinga, @wilkinsona
Regards, |
@allanneves @wilkinsona Thanks for these two observations Yes.. Looks like the issue has something to do with Intellij. I went to intellij settings & delegated build actions to gradle & the application works as expected. If I uncheck this box & run the app with intellij, then issue is consistently reproducible |
Raised an issue against intellij |
I'm going to reopen this just to check that there's not a work-around that we can put in place. |
Thank you, @allanneves and @thekalinga. I've reproduced the problem in IntelliJ IDEA. The cause is the names of the constructor parameters which are We should see if we can improve the diagnostics in the |
I've switched to using |
@wilkinsona Does this work with |
No, I don't believe it does. If that's something that you think Framework's parameter name discovery should take into consideration, please open a Framework issue. |
@wilkinsona Will open an issue. Thanks |
I tried using
@ConfigurationProperties
with an immutable class, but the object has all values set to default null valuesI used
2.2.0-BUILD-SNAPSHOT
version to test thisPlease find the test project in the attachment
spring-boot-playground.zip
The text was updated successfully, but these errors were encountered: