我已经花了18个小时玩Spring框架了。很漂亮,真的很棒。据我所见,spring知道如何使用rdbms数据库。
有人能告诉我spring + NoSQL ( cassandra,couchdb\mongodb,redis甚至HBase )的经验吗?
谢谢
发布于 2010-10-14 05:58:07
对于Cassandra,您可以使用赫克托。它有一个可用的spring集成(由我实现)。在测试资源中有一个示例xml --您只需映射3个bean,就可以插入并准备使用HectorTemplate。
对于其他方面--您说spring很漂亮,而且它确实很漂亮,因为您几乎可以使用它的任何API,而不需要API特别地依附于spring或依赖于spring。
发布于 2010-11-02 20:58:53
如果您想使用Redis,可以检查Jedis http://github.com/xetorthio/jedis (这是Redis的Java )。如果您正在使用Grails (Spring之上的一个groovy框架),您可以使用GORM http://www.grails.org/plugin/redis作为Redis的持久性框架。如果您想坚持使用java并在持久化框架中使用redis,可以使用JOhm http://github.com/xetorthio/johm。
发布于 2010-10-13 23:44:25
我假设您的意思是类似于JDBCTemplate。如果是这样的话,就没有基于模板的功能来支持整个NoSQL人群。您要么需要为该NoSQL客户端在客户端上构建自己的客户机。例如,Cassandra有许多客户是由不同的人编写的:
http://wiki.apache.org/cassandra/ClientOptions
您可能会对特定的NoSQL数据库感到幸运,似乎有人正在开发Cassandra4Spring框架:
http://code.google.com/p/workingonit/wiki/Cassandra4Spring
https://stackoverflow.com/questions/3928907
复制相似问题