Use since attribute in configuration properties deprecation consistently #47980
+1,024
−504
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #47872
For
additional-spring-configuration-metadata.jsonfiles, the existing:checkAdditionalSpringConfigurationMetadataGradle task was enhanced to verify that a non-emptysincefield exists any time there is adeprecationobject for a property.For annotation-based properties, an architecture rule was added to verify that a
@DeprecatedConfigurationPropertyannotation always has a non-emptysinceattribute. That should provide the fastest and most usable feedback, I think. I did not add to the:checkSpringConfigurationMetadataGradle task to verify generatedspring-configuration-metadata.jsonfiles because that felt redundant, but I'm happy to add that too if the team thinks that's more complete.There are a few properties that have been deprecated for a very long time, before Spring Boot 2.0.0 even. Should there be a threshold for how long a property stays in a manual metadata file? If you'd like to clean that up, I can remove some of the oldest ones in another commit on this PR, or as a separate issue.