我正在使用Typesafe / Lightbend Activator,并使用' minimal-akka-scala-seed'创建了一个项目。然后我将akka版本从2.3.11更改为2.4.2(当前稳定版本)。 现在我想在我的项目中添加最新的稳定Akka-HTTP和Akka-stream。我应该在build.sbt中写什么来做这个?
答案 0 :(得分:2)
一些工件不再标记为实验性的,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")
答案 1 :(得分:1)
请查看此示例https://github.com/theiterators/akka-http-microservice。它使用最新的akka-http
版本
答案 2 :(得分:0)
Akka HTTP文档有Compatibility with Akka部分。对Akka 2.5.11的建议是:
val akkaVersion = "2.5.11"
val akkaHttpVersion = "10.1.1"
libraryDependencies += "com.typesafe.akka" %% "akka-http" % akkaHttpVersion
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % akkaVersion
libraryDependencies += "com.typesafe.akka" %% "akka-stream" % akkaVersion
// If testkit used, explicitly declare dependency on akka-streams-testkit in same version as akka-actor
libraryDependencies += "com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test
libraryDependencies += "com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test