com.his.mongodb.exception.SystemMongoDBException: com.mongodb.MongoQueryException: Query failed with error code 2 and error message ‘bad sort specification’ on server
解决:
Document sort = new Document(“_id”, “-1”);
改为:
Document sort = new Document(“_id”, -1);