Skip to content

Custom default units declared on a field are ignored when binding properties in a native image #45343

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

Closed
ldwqh0 opened this issue May 1, 2025 · 1 comment
Assignees
Labels
type: bug A general bug
Milestone

Comments

@ldwqh0
Copy link

ldwqh0 commented May 1, 2025

This property behaves differently between native and non-native modes.
In non-native mode, the default time unit of spring.transaction.default-timeout is seconds.
In native mode, the default time unit of spring.transaction.default-timeout is milliseconds.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 1, 2025
@wilkinsona wilkinsona changed the title Bug with spring.transaction.default-timeout Default duration unit is ignored when binding properties in a native image May 1, 2025
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 1, 2025
@wilkinsona wilkinsona added this to the 3.3.x milestone May 1, 2025
@wilkinsona wilkinsona self-assigned this May 1, 2025
@wilkinsona wilkinsona changed the title Default duration unit is ignored when binding properties in a native image Custom default units are ignored when binding properties in a native image May 1, 2025
@wilkinsona wilkinsona changed the title Custom default units are ignored when binding properties in a native image Custom default units on a field are ignored when binding properties in a native image May 1, 2025
@wilkinsona wilkinsona changed the title Custom default units on a field are ignored when binding properties in a native image Custom default units declared on a field are ignored when binding properties in a native image May 1, 2025
@wilkinsona wilkinsona modified the milestones: 3.3.x, 3.3.12 May 1, 2025
@wilkinsona
Copy link
Member

Thanks for reporting this, @ldwqh0. It affected any JavaBean configuration property binding where the property's field was annotated. As I think you've already realised, you can avoid the problem by specifying a unit in your configuration property. Alternatively, you could add a reflection hint for the field backing the affected property. Neither will be necessary after the next round of maintenance releases later this month.

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

No branches or pull requests

3 participants