5

このトピックに関するいくつかの質問を見ましたが、私が行き詰まっている部分に答えるものはありません。ところで、人々が直面している問題に基づいて、結局、TemplatesPlugin のデフォルトの Java 実装を提供することをお勧めします。

私が抱えている問題は、必要な 2 つのビューを SecureSocial から自分のビュー フォルダーにコピーし、他の人が指摘したように RequestHeader を変更したことです: play.api.mvc.RequestHeader そして今、私は取得しています:

ambiguous implicit values: both method requestHeader in object PlayMagicForJava of type => play.api.mvc.RequestHeader and value request of type play.api.mvc.RequestHeader match expected type play.api.mvc.RequestHeader

バージョン: Play-2.1.1、Java 7、Master の SecureSocial。

編集:

プレイコンパイル:

[error] C:\Java\AwsConsole\app\views\secure\login.scala.html:41: ambiguous impli
cit values:
[error]  both method requestHeader in object PlayMagicForJava of type => play.ap
i.mvc.RequestHeader
[error]  and value request of type play.api.mvc.RequestHeader
[error]  match expected type play.api.mvc.RequestHeader
[error]                         @provider(p.id)
[error]                                  ^
[error] C:\Java\AwsConsole\app\views\secure\provider.scala.html:20: ambiguous im
plicit values:
[error]  both method requestHeader in object PlayMagicForJava of type => play.ap
i.mvc.RequestHeader
[error]  and value request of type play.api.mvc.RequestHeader
[error]  match expected type play.api.mvc.RequestHeader
[error]                 <form action = "@securesocial.core.providers.utils.Route
sHelper.authenticateByPost("userpass").absoluteURL(IdentityProvider.sslEnabled)"

[error]
                                                  ^
[error] two errors found
[error] (compile:compile) Compilation failed

代わりに Play Run の後にブラウジングします。

Internal server error, for (GET) [/] ->

sbt.PlayExceptions$CompilationException: Compilation error[ambiguous implicit va
lues:
 both method requestHeader in object PlayMagicForJava of type => play.api.mvc.Re
questHeader
 and value request of type play.api.mvc.RequestHeader
 match expected type play.api.mvc.RequestHeader]
        at sbt.PlayReloader$$anon$2$$anonfun$reload$2$$anonfun$apply$15$$anonfun
$apply$16.apply(PlayReloader.scala:349) ~[na:na]
        at sbt.PlayReloader$$anon$2$$anonfun$reload$2$$anonfun$apply$15$$anonfun
$apply$16.apply(PlayReloader.scala:349) ~[na:na]
        at scala.Option.map(Option.scala:133) ~[scala-library.jar:na]
        at sbt.PlayReloader$$anon$2$$anonfun$reload$2$$anonfun$apply$15.apply(Pl
ayReloader.scala:349) ~[na:na]
        at sbt.PlayReloader$$anon$2$$anonfun$reload$2$$anonfun$apply$15.apply(Pl
ayReloader.scala:346) ~[na:na]
        at scala.Option.map(Option.scala:133) ~[scala-library.jar:na]
4

1 に答える 1