我想在我的 Spring Boot 应用程序中使用 fongo 2.0.x,但我得到了错误
Error:(23, 44) java: cannot access com.mongodb.operation.OperationExecutor
class file for com.mongodb.operation.OperationExecutor not found
这是我的 AbstractMongoConfiguration
@Configuration
@ComponentScan("com.foo")
public class MongoDbConfig extends AbstractMongoConfiguration {
@Override
protected String getDatabaseName() {
return "demo";
}
@Override
public Mongo mongo() throws Exception {
return new Fongo(getDatabaseName()).getMongo(); //this line throws the error
}
}