Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
package spray.examples
import akka.actor.{Props, ActorSystem}
import spray.servlet.WebBoot
// This class is instantiated by the servlet initializer.
// It can either define a constructor with a single
// `javax.servlet.ServletContext` parameter or a
// default constructor.
// It must mplement the spray.servlet.WebBoot trait.
class Boot extends WebBoot {
// we need an ActorSystem to host our application in
val system = ActorSystem("example")
// the service actor replies to incoming HttpRequests
val serviceActor = system.actorOf(Props[DemoService])
system.registerOnTermination {
// put additional cleanup code here
system.log.info("Application shut down")
}
}