连接mongodb:publicclassGenericMga{
privateDBdb;
publicDBgetDB(){
returnthis.db;
}
publicvoidsetDB(DBdb){
this.db=db;
}
}DBCollectioncoll=null;
coll=getDB().getCollection("collName");//保存时候的名字相当于MySQL的表名创建查询条件:BasicDBObjectque..
分类:
数据库 时间:
2017-05-04 00:12:25
阅读次数:
183