2017-06-21 88 views
0

从游戏2.42.5迁移后,我们面临着废弃警告,内捻模板: ...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文件。 (twirlRecompilationLogger = TaskKey[(File, File) => Unit]),但play 2.5不包含它(play.twirl.sbt.TwirlKeys)。

任何想法如何抑制模板内的deprecation警告? 感谢

回答

0

如果我们希望抑制deprecation警告,我们应该修改与false标志旁边的方式-deprecation:false,如:

scalacOptions ++= Seq("-deprecation:false")

谷歌小组讨论here