Tôi đã thấy một số câu hỏi về chủ đề này, nhưng không có câu trả lời nào trong phần tôi bị kẹt. Nhân tiện, dựa trên những vấn đề mà mọi người đang gặp phải, tôi có thể đề nghị đưa ra một thực thi java mặc định của TemplatesPlugin sau khi tất cả.Chế độ xem tùy chỉnh trong SecureSocial trong Java
Vấn đề tôi có, là tôi sao chép hai quan điểm cần thiết từ SecureSocial vào thư mục quan điểm của tôi, và thay đổi RequestHeader như những người khác đã ghi nhận: play.api.mvc.RequestHeader và bây giờ tôi đang nhận được:
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
Phiên bản: Play-2.1.1, Java 7, SecureSocial từ Master.
EDIT:
Chơi Compile:
[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
Browsing sau Chơi Chạy thay vì:
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]
Tôi có vấn đề này cũng như trong phiên bản 2.1.1 .. không có giải pháp nào – adis
Bạn có thể vui lòng đăng thông báo lỗi đầy đủ để nó trở nên rõ ràng trong đó dòng của mẫu lỗi xảy ra. – MartinGrotzke
@MartinGrotzke Cập nhật câu hỏi với dấu vết ngăn xếp từ biên dịch và chạy –