-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
Allow more flexible Duration parsing #11078
Comments
Originally part of PR #11071 but we should have a consistent solution that's the same for all binding, not just micrometer. |
@philwebb this support is quite awesome. There are a bunch of places where we use a |
If the converter could treat no unit as milliseconds, perhaps we could then change a millisecond property that’s a long to be a Duration instead? |
That's the exact reason why I am asking for that support. |
Adding a no suffix == milliseconds should be easy and I like the idea of converting longs to |
That's awesome. There are a couple of comments on the commit, reopening to make sure they're not missed. |
This is fantastic folks. Results in beautiful config. |
What do you tihink about the HOCON (typesafe config) duration format? |
@b0c1 Looks like they were way ahead of us :) I like it, but I think I prefer to limit the number of choices for now. At least until someone complains that they'd rather type |
Binding to
Duration
is currently cumbersome. It would be nice if we could parse simpler formats like10s
,10m
etc.The text was updated successfully, but these errors were encountered: