简体   繁体   English

MongoDb和Java DAO实现

[英]MongoDb and java dao implementation

I would like to know if there is a way to implement the DAO design pattern to connect to a Nosql database (MongoDB) and do all the CRUD opérations. 我想知道是否有一种方法可以实现DAO设计模式以连接到Nosql数据库(MongoDB)并进行所有CRUD操作。 In my research i found all the solutions are related to spring support for MongoDB but I am using only pure Java. 在我的研究中,我发现所有解决方案都与对MongoDB的春季支持有关,但是我仅使用纯Java。

Have you tried using Morphia instead : https://mongodb.github.io/morphia/ Pretty much does the job. 您是否尝试过使用Morphia: https ://mongodb.github.io/morphia/几乎可以完成这项工作。

Here's a quick tutorial : https://dzone.com/articles/using-morphia-map-java-objects 这是一个快速教程: https : //dzone.com/articles/using-morphia-map-java-objects

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM