I'm using the async MongoDB Java Driver version 3.4.2, and I am building the project with Gradle (to be specific, I'm building org.mongodb:mongodb-driver-async:3.4.0
). When I import the line:
import com.mongodb.Block;
the import works just fine, but when I try to import:
import com.mongodb.BasicDBObject;
I get an error:
error: cannot find symbol
import com.mongodb.BasicDBObject;
What is the issue with my import here? In the most recent API documentation, MongoDB says that BasicDBObject
is still located within the package com.mongodb
driver and driver-async are two separate independent modules.
BasicDBObject
is part of driver
while Block
is part of driver-async
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.