如何将最新的 Akka-HTTP 和 Akka-stream 添加到 build.sbt
How to add newest Akka-HTTP and Akka-stream to build.sbt
我正在使用 Typesafe/Lightbend Activator,并使用 'minimal-akka-scala-seed' 创建了一个项目。然后我将 akka 版本从 2.3.11 更改为 2.4.2(当前稳定版本)。
现在我想将最新稳定的 Akka-HTTP 和 Akka-stream 添加到我的项目中。我应该在 build.sbt 中写什么才能做到这一点?
随着 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")
检查这个例子https://github.com/theiterators/akka-http-microservice。它使用最新的 akka-http
版本
我正在使用 Typesafe/Lightbend Activator,并使用 'minimal-akka-scala-seed' 创建了一个项目。然后我将 akka 版本从 2.3.11 更改为 2.4.2(当前稳定版本)。 现在我想将最新稳定的 Akka-HTTP 和 Akka-stream 添加到我的项目中。我应该在 build.sbt 中写什么才能做到这一点?
随着 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")
检查这个例子https://github.com/theiterators/akka-http-microservice。它使用最新的 akka-http
版本