sbt-revolver がセットアップされ、スプレー缶で実行されていることがわかりますが、サービスにリクエストを行ったときに変更が表示されません。
ログで、jrebel が実行していることを確認できます。
[success] Total time: 1 s, completed Feb 24, 2013 3:13:18 AM
app: [INFO] [02/24/2013 03:13:19.497] [com-example-Boot-spray.io.io-bridge-dispatcher-7] [akka://com-example-Boot/user/io-bridge] akka://com-example-Boot/user/io-bridge started
app: [INFO] [02/24/2013 03:13:19.851] [com-example-Boot-akka.actor.default-dispatcher-2] [akka://com-example-Boot/user/http-server] akka://com-example-Boot/user/http-server started on localhost/127.0.0.1:9000
> ~products
[success] Total time: 0 s, completed Feb 24, 2013 3:13:23 AM
1. Waiting for source changes... (press enter to interrupt)
[info] Compiling 1 Scala source to /Users/tripled153/Development/src/Foundationv2/spray-template/target/scala-2.10/classes...
[success] Total time: 2 s, completed Feb 24, 2013 3:13:33 AM
2. Waiting for source changes... (press enter to interrupt)
しかし、私の特性のメッセージを変更しても、更新時に表示されません。
package com.example
import akka.actor.Actor
import spray.routing._
import spray.http._
import MediaTypes._
// we don't implement our route structure directly in the service actor because
// we want to be able to test it independently, without having to spin up an actor
class MyServiceActor extends Actor with MyService {
// the HttpService trait defines only one abstract member, which
// connects the services environment to the enclosing actor or test
def actorRefFactory = context
// this actor only runs our route, but you could add
// other things here, like request stream processing
// or timeout handling
def receive = runRoute(myRoute)
}
// this trait defines our service behavior independently from the service actor
trait MyService extends HttpService {
val myRoute =
path("") {
get {
respondWithMediaType(`text/html`) { // XML is marshalled to `text/xml` by default, so we simply override here
complete {
<html>
<body>
<h1>Say hello to <i>spray-routing</i> on <i>spray-can</i>!</h1>
</body>
</html>
}
}
}
}
}
これは、リボルバーが設定されたスプレー缶の例に基づいています。 https://github.com/spray/spray-template