【发布时间】:2023-03-22 01:50:01
【问题描述】:
在从 play 2.4 迁移到 2.5 后,我们在 twirl 模板中遇到了弃用警告:
...web/templates/main.scala.html:159: method get in object Messages is deprecated: see corresponding Javadoc for more information.
[warn] <a href="@routes.Authentication.login()">@Messages.get("login") </a>
[warn] 1501 warnings found
scalaOptions 内的-deprecation 标志对类工作正常,但看起来它不会影响*.scala.html 文件。
Twirl wiki 提到了 withtwirlRecompilationLogger TaskKey (twirlRecompilationLogger = TaskKey[(File, File) => Unit]),但 play 2.5 不包含它 (play.twirl.sbt.TwirlKeys)。
任何想法如何抑制模板内的deprecation 警告?
谢谢
【问题讨论】:
标签: playframework playframework-2.5 scalac twirl