【发布时间】:2017-12-27 08:39:54
【问题描述】:
实际上是在学习如何使用 scala 进行编码,我需要一些帮助:
import play.api.libs.json._
case class Alert(email: String, query: String)
{
def main(args: Array[String]): Unit = { println("Hello from main of class")}
}
我收到一条错误消息:
Alert.scala:2: error: not found: object play
import play.api.libs.json._
One error found
我不知道问题出在哪里,我更新了 IntelliJ,甚至在我的 build.sbt 中添加了缺少的库依赖项
name := """alert"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
jdbc,cache,ws,
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % Test,
"org.tpolecat" %% "doobie-core" % "0.4.1",)
【问题讨论】:
标签: scala playframework sbt