!htt #19514 Update RouterSettings to be non case class
This commit is contained in:
parent
379a3a85b4
commit
61b375cec8
26 changed files with 188 additions and 64 deletions
|
|
@ -12,6 +12,7 @@ import akka.http.scaladsl.model._
|
|||
import akka.http.scaladsl.model.headers.{ Server, RawHeader }
|
||||
import akka.http.scaladsl.server.RouteResult.{ Complete, Rejected }
|
||||
import akka.http.scaladsl.server._
|
||||
import akka.http.scaladsl.settings.RoutingSettings
|
||||
import akka.stream.ActorMaterializer
|
||||
import akka.stream.scaladsl.{ FileIO, Sink, Source }
|
||||
import akka.util.ByteString
|
||||
|
|
@ -183,7 +184,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec {
|
|||
}
|
||||
"withSettings-0" in compileOnlySpec {
|
||||
//#withSettings-0
|
||||
val special = RoutingSettingsImpl(system).copy(fileIODispatcher = "special-io-dispatcher")
|
||||
val special = RoutingSettings(system).withFileIODispatcher("special-io-dispatcher")
|
||||
|
||||
def sample() =
|
||||
path("sample") {
|
||||
|
|
@ -687,7 +688,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec {
|
|||
"extractSettings-examples" in {
|
||||
//#extractSettings-examples
|
||||
val route =
|
||||
extractSettings { settings: RoutingSettingsImpl =>
|
||||
extractSettings { settings: RoutingSettings =>
|
||||
complete(s"RoutingSettings.renderVanityFooter = ${settings.renderVanityFooter}")
|
||||
}
|
||||
|
||||
|
|
@ -700,12 +701,12 @@ class BasicDirectivesExamplesSpec extends RoutingSpec {
|
|||
"mapSettings-examples" in {
|
||||
//#mapSettings-examples
|
||||
val tunedSettings = mapSettings { settings =>
|
||||
settings.copy(fileGetConditional = false)
|
||||
settings.withFileGetConditional(false)
|
||||
}
|
||||
|
||||
val route =
|
||||
tunedSettings {
|
||||
extractSettings { settings: RoutingSettingsImpl =>
|
||||
extractSettings { settings: RoutingSettings =>
|
||||
complete(s"RoutingSettings.fileGetConditional = ${settings.fileGetConditional}")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ Routing settings parameter name
|
|||
|
||||
``RoutingSettings`` were previously the only setting available on ``RequestContext``,
|
||||
and were accessible via ``settings``. We now made it possible to configure the parsers
|
||||
settings as well, so ``RoutingSettings`` is now ``routingSettings`` and ``ParserSetttings`` is
|
||||
settings as well, so ``RoutingSettings`` is now ``routingSettings`` and ``ParserSettings`` is
|
||||
now accessible via ``parserSettings``.
|
||||
|
||||
Changed Sources / Sinks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue