Play 文档声称它支持在数量前缀(MB、MiB、GB 等)中声明大小。但是它没有说明我应该如何在代码中读取这些值。
我有以下配置值:
discavo.upload.image.maxSize = 2 MiB
我尝试将其加载为
current.configuration.getInt("discavo.upload.image.maxSize").get
但出现以下错误:
Configuration error[conf/application.conf: 129: discavo.upload.image.maxSize has type STRING rather than NUMBER]