简体   繁体   中英

how to use int in scala messages file with play.api.i18n

As using hardcoded strings in scala(with play) is considered a sin. I have some hardcoded numbers in my code. So can i declare these numbers in the Messages file of play and then access them in project & convert them to Int/BigInteger whatever?

为了存储配置数据,请使用位于./conf目录中的application.conf,然后使用Play.current.configuration.getInt(“ some.property”)进行检索

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM