Lagom依赖Akka和Play Framework来实现某些功能。
与Lagom一起发布的Akka和Play版本通常足以运行Lagom应用程序。然而,在某些情况下,在保持Lagom相同版本的同时升级它们是有用的。当Akka和Play维护版本之间的二进制兼容性时,这通常是可能的。
记住Akka和Akka HTTP都不允许混合版本。因此,您必须确保同步覆盖依赖项树中所有工件的版本。
sbt
当你使用sbt时,你可以通过在build.sbt
中添加以下内容来强制使用新的Akka和Play版本:
val akkaVersion = "2.6.<newer-version>"
val akkaHttpVersion = "10.1.<newer-version>"
val playVersion = "2.8.<newer-version>"
libraryDependencies in ThisBuild ++= Seq(
"com.typesafe.akka" %% "akka-discovery" % akkaVersion,
"com.typesafe.akka" %% "akka-cluster-sharding" % akkaVersion,
"com.typesafe.akka" %% "akka-cluster-tools" % akkaVersion,
"com.typesafe.akka" %% "akka-coordination" % akkaVersion,
"com.typesafe.akka" %% "akka-distributed-data" % akkaVersion,
"com.typesafe.akka" %% "akka-persistence" % akkaVersion,
"com.typesafe.akka" %% "akka-persistence-query" % akkaVersion,
"com.typesafe.akka" %% "akka-protobuf" % akkaVersion,
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-core" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion,
"com.typesafe.play" %% "play" % playVersion,
同时更新project/plugins.sbt
中的play插件版本:
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % playVersion)