Scalaextend - opensas/Play20Es GitHub Wiki

Building on top of Play

Esta página todavía no ha sido traducida al castellano. Puedes ayudarnos con la tarea simplemente presionando el botón Edit Page. Para más información puedes leer esta guía para el traductor. Aquí puedes ver cuánto nos falta para terminar la traducción.

Note: this is a somewhat advanced topic, most users safely can ignore this

While one can really take advantage of most play features while building a full application from scratch using play, it's very easy to drop play into existing sbt/maven projects and with just a little work use it as a REST/HTTP library. Below you can see how to do that.

Rolling your own

A Global object extending GlobalSettings in the global name space is the key wiring point. GlobalSettings has a method def onRouteRequest(request: RequestHeader): Option[Handler] that's handling play's routing.

One could easily provide an alternative implementation and start using play as an REST library!

See this for an example.

⚠️ **GitHub.com Fallback** ⚠️