Using roo to create a springsource project with mongo

柔情痞子 提交于 2019-12-23 11:36:08

问题


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 SpringSource 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.


回答1:


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.




回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/6079461/using-roo-to-create-a-springsource-project-with-mongo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!