这里的示例代码都是简要代码,详细代码可以参考我打包好的代码,地址:百度云 mongo-demo.rar
构建Document
Document document = new Document();
document..append("name", "MongoDB");
DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH);
Document doc = new Document("name", "mongodb")
.append("num", 29</