Lagom依赖Akka和Play Framework来实现某些功能。
与Lagom一起发布的Akka和Play版本通常足以运行Lagom应用程序。然而,在某些情况下,在保持Lagom相同版本的同时升级它们是有用的。当Akka和Play维护版本之间的二进制兼容性时,这通常是可能的。
记住Akka和Akka HTTP都不允许混合版本。因此,您必须确保同步覆盖依赖项树中所有工件的版本。

sbt

当你使用sbt时,你可以通过在build.sbt中添加以下内容来强制使用新的Akka和Play版本:

  1. val akkaVersion = "2.6.<newer-version>"
  2. val akkaHttpVersion = "10.1.<newer-version>"
  3. val playVersion = "2.8.<newer-version>"
  4. libraryDependencies in ThisBuild ++= Seq(
  5. "com.typesafe.akka" %% "akka-discovery" % akkaVersion,
  6. "com.typesafe.akka" %% "akka-cluster-sharding" % akkaVersion,
  7. "com.typesafe.akka" %% "akka-cluster-tools" % akkaVersion,
  8. "com.typesafe.akka" %% "akka-coordination" % akkaVersion,
  9. "com.typesafe.akka" %% "akka-distributed-data" % akkaVersion,
  10. "com.typesafe.akka" %% "akka-persistence" % akkaVersion,
  11. "com.typesafe.akka" %% "akka-persistence-query" % akkaVersion,
  12. "com.typesafe.akka" %% "akka-protobuf" % akkaVersion,
  13. "com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
  14. "com.typesafe.akka" %% "akka-stream" % akkaVersion,
  15. "com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
  16. "com.typesafe.akka" %% "akka-http-core" % akkaHttpVersion,
  17. "com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion,
  18. "com.typesafe.play" %% "play" % playVersion,

同时更新project/plugins.sbt中的play插件版本:

  1. addSbtPlugin("com.typesafe.play" % "sbt-plugin" % playVersion)