스프레이 캔에서 sbt-revolver가 설정되어 실행되고 있지만 변경 사항이 표시되지 않습니다. 서비스에 요청하십시오.Scala - Spray.io - sbt-revolver - jrebel - 다시로드 할 때 HttpService (또는 기타)에 변경 사항이 표시되지 않음
당신은 그것의 일을하고 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
설정이 잘못되었다는 것은 어렵습니다. github에서 예제 프로젝트를 만들 수 있습니다. – 4e6
프로젝트는 여기에 스프레이 템플릿 프로젝트입니다 : https://github.com/spray/spray-template/ – JasonG
그것은 저에게 효과적입니다. 재미있는 ... 어쩌면 jrebel 라이센스 활성화 문제 일 수 있습니다. jrebel의 출력을're-start'에서 볼 수 있습니까? 예를 들어, myJRebel 서버에 접속 중입니다. 버전, 라이센스 등에 대한 정보가 있습니까? – 4e6