更新时间:2023-08-24 17:06:28
三件事:
示例中的所有 Scala 代码都应替换为:
All the Scala code in your example should be replaced by:
val x_fp_hash = AuthorizeNetFingerprint.Fingerprint.createFingerprint(…)
这适用于使用 sbt (0.11.3) 编译的 Scala (2.9.1) 控制台.
This works in the Scala (2.9.1) console, compiled with sbt (0.11.3).
是的,您可以在 Play2 应用程序中混合使用 Java 和 Scala,只需将 Java 代码放在 app 目录中即可.请注意,Java 类需要在其对应的包目录中,而 Scala 类则不然.
Yes, you can mix Java and Scala in a Play2 application, just put the Java code in the app directory. Note that Java classes need to be in their corresponding package directories, which is not the case for Scala classes.