Document that constructor binding does not support @…Unit annotations

Closes gh-22565
This commit is contained in:
Andy Wilkinson 2020-07-30 09:04:30 +01:00
parent e1617185a1
commit 1871cffc7d

View File

@ -1341,6 +1341,8 @@ These are:
* `d` for days
The default unit is milliseconds and can be overridden using `@DurationUnit` as illustrated in the sample above.
Note that `@DurationUnit` is only supported with JavaBean-style property binding using getters and setters.
It is not supported with constructor binding.
TIP: If you are upgrading from a previous version that is using `Long` to express the duration, make sure to define the unit (using `@DurationUnit`) if it isn't milliseconds alongside the switch to `Duration`.
Doing so gives a transparent upgrade path while supporting a much richer format.