【问题标题】:How to add newest Akka-HTTP and Akka-stream to build.sbt如何将最新的 Akka-HTTP 和 Akka-stream 添加到 build.sbt
【发布时间】:2016-07-08 16:32:29
【问题描述】:

我正在使用 Typesafe/Lightbend Activator,并使用“minimal-akka-scala-seed”创建了一个项目。然后我将 akka 版本从 2.3.11 更改为 2.4.2(当前稳定版本)。 现在我想将最新的稳定 Akka-HTTP 和 Akka-stream 添加到我的项目中。我应该在 build.sbt 中写什么来做到这一点?

【问题讨论】:

    标签: sbt akka typesafe-activator akka-stream akka-http


    【解决方案1】:

    2.4.2 版本中的某些工件不再标记为实验性。

    我相信,依赖列表应该是这样的:

    libraryDependencies ++= Seq(
      // akka
      "com.typesafe.akka" %% "akka-actor" % "2.4.2",
      "com.typesafe.akka" %% "akka-testkit" % "2.4.2" % "test",
      // streams
      "com.typesafe.akka" %% "akka-stream" % "2.4.2",
      // akka http
      "com.typesafe.akka" %% "akka-http-core" % "2.4.2",
      "com.typesafe.akka" %% "akka-http-experimental" % "2.4.2",
      "com.typesafe.akka" %% "akka-http-testkit" % "2.4.2" % "test",
      // the next one add only if you need Spray JSON support
      "com.typesafe.akka" %% "akka-http-spray-json-experimental" % "2.4.2",
      "org.scalatest" %% "scalatest" % "2.2.4" % "test")
    

    【讨论】:

    【解决方案2】:

    查看此示例https://github.com/theiterators/akka-http-microservice。它使用最新的akka-http 版本

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-08
      • 2016-08-15
      • 2017-07-17
      • 2017-01-30
      • 2019-03-15
      • 2020-08-14
      • 1970-01-01
      • 2020-05-31
      相关资源
      最近更新 更多