Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有大量数据记录,并且每个记录在我的域中都有唯一的 id。那么我可以在 mongodb 的插入文档中禁用(不保存)ObjectID 吗?这将占用大量磁盘空间...
该_id字段是强制性的,您需要为每个文档提供一个唯一值,但它不必是 ObjectID。您可以改用整数值来节省空间,但您需要确保每个文档的值是唯一的。
_id
使用您域中的唯一 ID 作为 _id .. 如果您没有提及 _id 。Mongo 自动分配 ObjectId。ObjectId 的类型是 ObjectID。
在我的应用程序中,其中一个 jsp 成功地将输入参数通过命令对象传递给我的控制器。但是,我对另一个 jsp 及其控制器采用了相同的方法,但它不起作用。我从未为任何其他 JSP 工作过。
以下是代码-spring xml
<bean id