mongodb怎么设置存储的数据类型
java用spring管理mongodb 怎么修改mongodb中list中的数据 MongoClient client=new MongoClient(\"192.168.0.110\",27017);DBCollection dbCollection=client.getDB(\"test\").getCollection(\"update_array\");dbCollection.drop();dbCollection=client.getDB(\"test\").getCollection(\"update_array\");BasicDBObject dbObject=new BasicDBObject();dbObject.append(\"id\",583739819102582565L).append(\"kids\",Arrays.asList(\"1\",\"2\",\"3\"));dbCollection.insert(dbObject);System.out.println(dbCollection.findOne());BasicDBObject dbObject2=new BasicDBObject(dbObject);dbObject2.append(\"kids\",Arrays.asList(\"1\",\"2\",\"3\",\"4\"));dbCollection.update(dbObject,dbObject2);System.out.println(dbCollection.findOne());测试结e79fa5e98193e58685e5aeb931333335343434果:{\"_id\":{\"$oid\":\"546f37f7d01de241a1e143e8\"},\"id\":583739819102582565,\"kids\":[\"1\",\"2\",\"3\"]}{\"_id\":{\"$oid\":\"546f37f7d01de241a1e143e8\"},\"id\":583739819102582565,\"kids\":[\"1\",\"2\",\"3\",\"4\"]}org.mongodbmongo-java-driver2.12.3
MongoDB 创建用户 修改权限 修改密码 删除用户,MogoDBLiux运维常用命令。