package com.xxfc.platform.im.biz;

import com.mongodb.DB;
import com.mongodb.Mongo;

public  class MGDBCollection {

    private static final String HOST = "10.5.52.3";
    private static final int PORT = 28018;
    private static final String DB_NAME = "imapi";
    private static Mongo mongo;
    private static DB db;

    static {
        // 连接到MongoDB
        mongo = new Mongo(HOST, PORT);
        // 打开数据库 testDB
        db = mongo.getDB(DB_NAME);
    }

    public static DB getDB(){
        return db;
    }
}
