看起來好像Redis的模塊僅可用於播放的1.x: http://www.playframework.com/modules/redisRedis for Java Play 2.x?
什麼我需要使用的Redis數據庫與播放2.2應用程序?
看起來好像Redis的模塊僅可用於播放的1.x: http://www.playframework.com/modules/redisRedis for Java Play 2.x?
什麼我需要使用的Redis數據庫與播放2.2應用程序?
它的支持,並在一個月前,升級支持播放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。
謝謝!當我嘗試運行類型安全redis項目的示例應用程序時,出現以下錯誤:[error](*:update)sbt.ResolveException:無法解析的依賴項:com.typesafe#play-plugins-redis_2.10; 2.0 .4:找不到 –
@ mobileideafactory.com:訣竅在於實際查找存儲庫中存在的版本。去這裏找到一個:http://repo.typesafe.com/typesafe/releases/com/typesafe/(我從http://abansnest.blogspot.com.au/2013/04/playmongoredis.html獲得該鏈接) –
我強烈建議查看[可擴展的聊天應用程序與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 –
對於未來的參考資料,有一個play-redis插件實現緩存API for play 2.3和更進一步https://github.com/KarelCemus/play-redis – Gaim