2017-06-21 76 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