Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@scottfrederick
Copy link
Contributor

Fixes #47872

For additional-spring-configuration-metadata.json files, the existing :checkAdditionalSpringConfigurationMetadata Gradle task was enhanced to verify that a non-empty since field exists any time there is a deprecation object for a property.

For annotation-based properties, an architecture rule was added to verify that a @DeprecatedConfigurationProperty annotation always has a non-empty since attribute. That should provide the fastest and most usable feedback, I think. I did not add to the :checkSpringConfigurationMetadata Gradle task to verify generated spring-configuration-metadata.json files 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.

Add an architecture rule to ensure that all usages of
`@DeprecatedConfigurationProperty` in the Spring Boot codebase include
the `since` attribute.

Add the `since` attribute to the few places where it was not already
included.

Signed-off-by: Scott Frederick <[email protected]>
Add the `since` field to all deprecated properties in all
additional-spring-configuration-metadata.json files in the project.

Add to the CheckAdditionalSpringConfigurationMetadata build task to
ensure that all deprecated properties have a non-empty `since` field.

Signed-off-by: Scott Frederick <[email protected]>
@scottfrederick scottfrederick force-pushed the gh-47872-deprecate-since branch from a122ef1 to 3f58fcb Compare November 7, 2025 00:33
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 7, 2025
@scottfrederick scottfrederick changed the title Gh 47872 deprecate since Use since attribute in configuration properties deprecation consistently Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants