开发者

Using roo to create a springsource project with mongo

开发者 https://www.devze.com 2023-03-07 04:54 出处:网络
Preface: I am coming from a .NET and PHP backround. I\'m pretty comfortable with making a console app in Java. I\'ve never used an ORM on any platform. I\'m trying to learn enterprise java best practi

Preface: I am coming from a .NET and PHP backround. I'm pretty comfortable with making a console app in Java. I've never used an ORM on any platform. I'm trying to learn enterprise java best practices. Therefore, if I sound ignorant, its probably because I am.

I downloaded the latest version of the SpringSourc开发者_如何学Goe Tool Suite. I want to make a spring project with a JPA mongo (adapter/driver/driver whatever). I'd like to do so with roo. So what I think I need to know is the name of a JPA library that has a mongodb driver.


Check out Kundera, it's a JPA 1.0 ORM library for the Cassandra/Hbase/MongoDB database. For info about getting started, see this blog post: Working with MongoDB using Kundera.


Please try newer version of Kundera, i.e. 2.0.1. It has gone a major change since its inception and I see a lot of new features getting added and bugs being fixed. Currently it supports JPA 1.0 and Cassandra 0.7.6/ HBase/ MongoDB but we are planning to add support for Cassandra 0.8 and JPA 2.0 very soon. There is a pretty good example here: https://github.com/impetus-opensource/Kundera/wiki/Getting-started


You can use Spring data mongodb, is not JPA but is easy to use. Also, Spring roo has support to use it as persistence layer.

Good luck.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号