- 經過routes文件定義
GET /favicon.ico controllers.Assets.at(path="/public", file="favicon.ico")
GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset)
- 經過Assets生成的action訪問
controllers.Assets.versioned(path="/public", file="html/index.html")(request)
controllers.Assets.at(path="/public", file="html/index.html")(request)
- 直接生成File Result
Ok.sendFile(new File("public/html/index.html")).as("text/html; charset=UTF-8")
Ok.sendPath(Paths.get("public/html/index.html")).as("text/html; charset=UTF-8")