I'm migrating an Play 2.4 application to 2.5 and now play.Play.application().isProd
is deprecated. I use this in various places in scala.html templates. (To decide weather or not to use minimized javascript.)
It seems unreasonable to pass this in as parameters into every template.
Is there a way to inject the Application
into the template directly?
我在2.4中使用了相同的方法,在2.5中我切换到了play.Environment.simple().isProd
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.