-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Provide a configuration validation mechanism #10030
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
Comments
Any progress with this issue? Being unable to easily debug such issues is really a pain in the neck |
As with #12601 |
We don't have any immediate plans to look at this one. We have quite a few other strategically important issues that we need to look at before this one. |
Ok, thank you |
Any strategies to bypass the issue currently? Having quiet some issues with not validating configuration properties before reloading the application entirely |
we are very interested in this feature, as we have configuration properties that are managed by non-developers that might use IDEs that dont display properly if configuration syntax is correct. I was looking for an option to hard fail a service startup if there is an unknown property (all properties) and was suprised when i failed to find such feature. |
It would be nice if Spring Boot had a specific flag that would turn on extensive configuration validation, something similar to what we have with
--debug
(--config-validation
?).Let's say the user made a typo in a property or edited a file used by the config server with no assistance. If you know what you are looking for and the application starts and you have the actuator you can hit
/application/configprops
to see if the property has been bound properly. This works but we could do better.The binding has already an option to fail if we are not able to bind a particular property (see
@ConfigurationProperties#ignoreInvalidFields
). One idea would be to have a mode where:FailureAnalyzer
that provides a nice and readable report (We do have some concept of origin of the property in 2.0 so we should use that)I am pretty convinced that turning on this mechanism on a perfectly valid application will generate false positive but we may find a way to mitigate that.
This issue related to #9936 and, IMO, should supersede it.
The text was updated successfully, but these errors were encountered: