Playframework Securesocial视图自定义
正如文档中提到的,我创建了一个CustomTemplatesPlugin,它扩展了TemplatesPlugin并实现了getLoginPage函数Playframework Securesocial视图自定义,playframework,securesocial,Playframework,Securesocial,正如文档中提到的,我创建了一个CustomTemplatesPlugin,它扩展了TemplatesPlugin并实现了getLoginPage函数 @Override public Html getLoginPage(Request arg0, Form> arg1, Option arg2) { //Logger.info(" In getLoginPage"); return views.Registration.html.login(arg1,arg2); } 我在视图下创建了一
@Override
public Html getLoginPage(Request arg0,
Form> arg1, Option arg2) {
//Logger.info(" In getLoginPage");
return views.Registration.html.login(arg1,arg2);
}
我在视图下创建了一个名为Registration的文件夹,然后将login.scala.html文件从securesocial复制到该文件夹中
当我尝试访问localhost:9000/login时,我收到一个“未找到”:
value requestheader错误,因此我修改了中的第一行
login.scala.html登录到
之后,我在浏览器中再次尝试。现在列出以下错误
not found: value provider
In E:\playtest\ss\app\views\Registration\login.scala.html at line 40.
37
@Messages("securesocial.login.instructions")
38
39 @for(p <- externalProviders) {
40 @provider(p.id)
}
}
未找到:值提供程序
在第40行的E:\playtest\ss\app\views\Registration\login.scala.html中。
37
@消息(“securesocial.login.instructions”)
38
39@for(p默认模板使用provider.scala.html文件。将该文件复制到应用程序中,@provider将正常工作
not found: value provider
In E:\playtest\ss\app\views\Registration\login.scala.html at line 40.
37
@Messages("securesocial.login.instructions")
38
39 @for(p <- externalProviders) {
40 @provider(p.id)
}
}