更新时间:2023-09-10 22:34:46
语法:
<a href='@routes.Application.show("some")'>My link with some string</a>
通过类比,您还可以在控制器中生成网址。即。在某些操作后重定向:
By analogy you can also generate urls in your controllers. ie. for redirecting after some action:
public static Result justRedirect(){
// use as String
String urlOfShow = routes.Application.index().toString().
// or pass as a redirect() arg
return redirect(routes.Application.show("some"));
}