【问题标题】:How to use templatesImport in build.sbt with Playframework 2.5.x如何使用 Play Framework 2.5.x 在 build.sbt 中导入模板
【发布时间】:2017-05-20 16:55:02
【问题描述】:

here 我也有同样的问题。我正在使用 Play 2.5.10、Scala 2.11.7 和 sbt 0.13.11

我想在每个模板中导入通用包。

当我在 build.sbt 中使用以下内容时出现构建错误:

templatesImport ++= Seq(
    "helper._",
    "play.api._"
)

构建错误:

build.sbt: error: not found: value templatesImport

【问题讨论】:

    标签: scala sbt playframework-2.5


    【解决方案1】:

    找到解决方案here:

    改成:

    TwirlKeys.templateImports ++= Seq(
      "helper._",
      "play.api._"
    )
    

    【讨论】:

      猜你喜欢
      • 2014-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-02
      • 1970-01-01
      • 2016-07-04
      • 2016-08-18
      • 1970-01-01
      相关资源
      最近更新 更多