0

我正在尝试使用此字段为 Morphia 注释 java 对象:

@Id private ObjectId id;

但是我的代码在代码中出现了这个错误:

org.bson.types.ObjectId can not be found in source packages. Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly.

虽然应用程序有 Morphia 和 MongoDB 罐子。

任何想法为什么会出现这个问题?

4

0 回答 0