从 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
-deprecation内部标志scalaOptions适用于类,但看起来它不会影响*.scala.html文件。
Twirl wiki 提到withtwirlRecompilationLogger TaskKey( twirlRecompilationLogger = TaskKey[(File, File) => Unit]),但play 2.5不包含 ( play.twirl.sbt.TwirlKeys)。
任何想法如何抑制deprecation模板内的警告?谢谢