Skip to content
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

@ConfigurationProperties doesn't properly support Yaml null values #40176

Closed
Sroca3 opened this issue Apr 5, 2024 · 1 comment
Closed

@ConfigurationProperties doesn't properly support Yaml null values #40176

Sroca3 opened this issue Apr 5, 2024 · 1 comment
Labels
status: duplicate A duplicate of another issue

Comments

@Sroca3
Copy link

Sroca3 commented Apr 5, 2024

Problem
When processing configuration properties from a yaml file it appears there is not proper support of nulls even though yaml supports null as a first class citizen. Instead the YamlProcessor from spring framework and in turn the OriginTrackedYamlLoader in spring boot both convert null values to empty strings.

Example Usage
Whether this is the right way to do this or not is up for debate, but as an example of where this would be useful is below. The attempt was to store the interpretation of the is not null sql concept in yaml in a configuration file:

condition:
  operator: NOT_EQUAL_TO
  values: 
  - ~

or the equivalent

condition:
  operator: NOT_EQUAL_TO
  value: [null]

Related issue
There is already an existing issue logged many years ago for spring-framework that is yet to be addressed. Both would have to be addressed to completely fix this gap though.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 5, 2024
@philwebb
Copy link
Member

philwebb commented Apr 5, 2024

I think this a duplicate of #24133

@philwebb philwebb closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2024
@philwebb philwebb added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants