2013-10-27 41 views

回答

1

它的支持,並在一個月前,升級支持播放2.2:

在這裏看到:https://github.com/typesafehub/play-plugins/blob/master/redis/sample/project/Build.scala

import sbt._ 
import Keys._ 

object ApplicationBuild extends Build { 

    val appName   = "j" 
    val appVersion  = "1.0-SNAPSHOT" 

    val appDependencies = Seq(
     "com.typesafe" %% "play-plugins-redis" % "2.2.0", 
     "com.typesafe.play" %% "play-cache" % "2.2.0" 
    ) 

    val main = play.Project(appName, appVersion, appDependencies).settings(
     // Add your own project settings here  
    ) 
} 

這裏,它說,這是與Jedis使用插件(JAVA)和Sedis(斯卡拉): https://github.com/typesafehub/play-plugins/tree/master/redis

所以你可能要使用Jedis。

+1

謝謝!當我嘗試運行類型安全redis項目的示例應用程序時,出現以下錯誤:[error](*:update)sbt.ResolveException:無法解析的依賴項:com.typesafe#play-plugins-redis_2.10; 2.0 .4:找不到 –

+1

@ mobileideafactory.com:訣竅在於實際查找存儲庫中存在的版本。去這裏找到一個:http://repo.typesafe.com/typesafe/releases/com/typesafe/(我從http://abansnest.blogspot.com.au/2013/04/playmongoredis.html獲得該鏈接) –

+0

我強烈建議查看[可擴展的聊天應用程序與Play Framework 2.x和WebSockets](https://devcenter.heroku.com/articles/play-java-websockets-advanced)。它使用Redis(pub/sub)和Jedis java客戶端。鏈接到github存儲庫 - https://github.com/heroku-examples/play-websockets-chat-sample –