我正在將Spray.io中的應用程序遷移到Akka-http。該應用程序是基於微服務的,有許多我們建立在其上的小型庫。以下是在一個特定的微服務構成指令和路由的示例:從spray.io遷移到akka http
val routes =
(decompressRequest & compressResponseIfRequested) {
metricsRoute ~
healthStatusRoute ~
apiRoutes // only these are my app's routes
}
所有上述的,除了apiRoutes
在內部庫中定義。
我想開始在這個微服務中使用Akka-http(遷移apiRoutes
到Akka-http)而不更改我目前使用的任何庫,因爲這會迫使所有其他開發人員在同一時間。
這可能嗎?有什麼方法讓Akka-http使用Spray.io指令/路由?
據我所知,migration guide沒有這樣的信息。