0
pathPrefix("ball") {
pathEnd {
complete("/ball")
} ~
path(IntNumber) { int =>
complete(if (int % 2 == 0) "even ball" else "odd ball")
}
}
什麼是「〜」標誌表明這裏什麼是「〜」符號標註,當我們在斯卡拉REST服務定義pathPrefix?
http://doc.akka.io/docs/akka-http/10.0.9/scala/http/routing-dsl/routes.html#composing-routes – ccheneson