标签:priority pre 增加 .com fine 配置 file public http
例如我想增加
http://localhost:9000/hello
首先为Application.java新增一个方法
1 public static void hello() { 2 render(); 3 }
之后在/app/views/Application下新增hello.html文件
最后配置conf/routes新增
GET /hello Application.hello
# Routes # This file defines all application routes (Higher priority routes first) # ~~~~ # Home page GET / Application.index GET /hello Application.hello # Ignore favicon requests GET /favicon.ico 404 # Map static resources from the /app/public folder to the /public path GET /public/ staticDir:public # Catch all * /{controller}/{action} {controller}.{action}
之后重新启动项目,即可成功
标签:priority pre 增加 .com fine 配置 file public http
原文地址:https://www.cnblogs.com/xfww/p/10530220.html