scala - Play framework - parse duration parameter in configuration file -
play! official documentation on configuration file says possible specify duration variables using proper keywords.
how retrieve variables in application? mean, in order read string
variable use:
val conf = play.configuration.getstring("name.of.the.variable").get
but don't see play.configuration.getduration()
or similar function.
thanks.
i've found solution:
val conf: finiteduration = play.configuration.getmilliseconds("foo.bar").get milliseconds
Comments
Post a Comment