【发布时间】:2020-11-17 09:47:59
【问题描述】:
我曾经像这样在 Bindings 中设置我的演员系统:
implicit val System: ActorSystem = ActorSystem()
implicit val Mat: Materializer = ActorMaterializer(ActorMaterializerSettings.create(System).withSupervisionStrategy(Decider))
但在新版本中 ActorMaterializer.apply/.create/.withSupervisionStrategy 已被弃用:
@deprecated(
"Use the system wide materializer or Materializer.apply(actorContext) with stream attributes or configuration settings to change defaults",
"2.6.0")
@deprecated(
"Use the system wide materializer or Materializer.create(actorContext) with stream attributes or configuration settings to change defaults",
"2.6.0")
@deprecated("Use attribute 'ActorAttributes.supervisionStrategy' to change setting value", "2.6.0")
我不确定我的 2 行 System/Mat.... 应该改变什么。
【问题讨论】:
标签: playframework akka akka-stream