Gor*_*n13 2 scala playframework
我正在尝试在Play中使用WS库,但是我找到的所有教程中显示的导入都不起作用.
它是否以某种方式改变了,教程没有更新或者我的设置有问题?
我正在使用:Scala 2.11 Play 2.5
这是在我的build.sbt中:
libraryDependencies ++= Seq(
ws
)
Run Code Online (Sandbox Code Playgroud)
这是代码中的导入:
import play.api.libs.ws._
Run Code Online (Sandbox Code Playgroud)
这是错误:
object ws is not a member of package play.api.libs
注意:我看到WS库在版本2.4中是可选的,根据:https://www.playframework.com/documentation/2.4.x/Migration23#Play-WS
我尝试使用此导入:import play.api.Play.current但我仍然遇到错误
有任何想法吗?