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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -