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
Externalized Configuration ignores null values in SPRING_APPLICATION_JSON #21542
Comments
Here's a small test that reproduces the issue:
Debugging things it appears that we The problem is that |
I've raised spring-projects/spring-framework#25142. Please track that issue to see what the framework team have to say. For now, I suggest using an empty string instead of |
But the problem concerns not only
If I try to override
or
or
nothing happens, application will get
in every mentioned case. |
Reopening to consider spring-projects/spring-framework#25142 (comment) |
@rgordeev Does |
@philwebb Yes, that works for all types of properties, but it not obvious at all. You may see test cases Test case Defaults
Test case With Empty Lists
We are trying to override
Test case With Empty Objects
We are trying to override
Test case With Empty Strings
We are trying to override
Test case With Non null Values
We are trying to override
Test case With Null values
We are trying to override
|
I think this is because of the way |
We have decided to add the values specified by the user as is to the property source for |
E.g. there is a configuration
application.yaml
I try to override these properties with
And it doesn't override values from
yaml
file, but when values injson
are not null everything works fine.The text was updated successfully, but these errors were encountered: