libraryDependencies ++= Seq( "com.typesafe.play" %% "play" % "2.8.0", "com.typesafe.play" %% "play-java" % "2.8.0", "com.typesafe.play" %% "play-guice" % "2.8.0", ) html @(name: String) <html> <body> <h1>Hello, @name!</h1> </body> </html> package controllers; import play.mvc.Controller; import play.mvc.Result; public class HomeController extends Controller { public Result index() { String name = "World"; return ok(views.html.hello.render(name)); } } GET / controllers.HomeController.index() sbt run play run


上一篇:
下一篇:
切换中文