首页  

play框架调试关键代码     所属分类 play 浏览量 546
com.typesafe.play.play-akka-http-server_2.12-2.8.1.jar
play.core.server.AkkaHttpServer
断点 启动debug
createServerBinding
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000


play框架启动 
第一次访问 才会进入
play.api.Play#start
play.api.Play - Application started (Dev) (no global state)
com.typesafe.play.play_2.12-2.8.8.jar

play.core.server.AkkaHttpServer#handleRequest
private def handleRequest(request: HttpRequest, secure: Boolean): Future[HttpResponse] = {
com.typesafe.play.play-server_2.12-2.8.8.jar

本地开发环境 DEV 模式 修改代码  会热部署
在controller 断点
由 DI 容器 guice 创建实例

play.api.inject.guice.GuiceBuilder#injector
val guiceInjector = Guice.createInjector(stage, applicationModule())


动态生成的 路由 
Routes.scala


lsof -i tcp:9000

重要的类
play.api.Play
play.api.Application
DefaultApplication

上一篇     下一篇
scala 函数参数的求值策略

scala 元组

Scala中的 -> <- => {} ()

scala 包对象 package object

play Configuration 配置读取

play action 要点