Skip to content

Deprecate @DurationFormat and related classes #35452

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
philwebb opened this issue May 16, 2023 · 4 comments
Open

Deprecate @DurationFormat and related classes #35452

philwebb opened this issue May 16, 2023 · 4 comments
Labels
type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

If spring-projects/spring-framework#30396 is merged we can deprecate our own implementation (assuming they are compatible).

@philwebb philwebb added this to the 3.2.x milestone May 16, 2023
@philwebb philwebb added type: enhancement A general enhancement status: blocked An issue that's blocked on an external project change labels May 16, 2023
@snicoll snicoll modified the milestones: 3.2.x, 3.x Aug 3, 2023
@wilkinsona
Copy link
Member

The Framework PR was merged in 6.2. Should we look at deprecating our support in 3.5 so we can remove it in 4.0?

@wilkinsona wilkinsona removed the status: blocked An issue that's blocked on an external project change label Apr 25, 2025
@wilkinsona wilkinsona modified the milestones: 3.x, 3.5.x Apr 25, 2025
@wilkinsona wilkinsona added the for: team-meeting An issue we'd like to discuss as a team to make progress label Apr 25, 2025
@philwebb
Copy link
Member Author

philwebb commented May 7, 2025

We're going to try and get this into the GA

@philwebb philwebb removed the for: team-meeting An issue we'd like to discuss as a team to make progress label May 7, 2025
@philwebb philwebb modified the milestones: 3.5.x, 3.5.0 May 7, 2025
@mhalbritter
Copy link
Contributor

In our configuration properties, we use @DurationUnit(ChronoUnit.SECONDS), which sets the default duration unit.

When migrating to Framework's annotations there's no thing as a @DurationUnit annotation. The next best thing is @DurationFormat(style = Style.SIMPLE, defaultUnit = Unit.SECONDS), but this forces us to set a style. @DurationUnit(ChronoUnit.SECONDS) auto-detects simple and ISO8601, which @DurationFormat(style = Style.SIMPLE, defaultUnit = Unit.SECONDS) doesn't. Unfortunately there's no Style.AUTODETECT in framework.

@mhalbritter mhalbritter added for: team-meeting An issue we'd like to discuss as a team to make progress and removed for: team-meeting An issue we'd like to discuss as a team to make progress labels May 12, 2025
@mhalbritter mhalbritter modified the milestones: 3.5.0, 4.x May 12, 2025
@mhalbritter
Copy link
Contributor

We talked about that and we decided to not deprecate it in 3.5.x because there's no 1 to 1 match to the Spring Framework annotations.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants