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.
我正在尝试使用我的 mongo db 代替我当前的 apache derby 数据库。我如何连接我的 mongo db 来做到这一点?
Mongo 有一个 java 驱动程序,以及如何使用它的示例。 看看这个教程。 另外,我建议你定义一个带有DAO接口的数据访问层,这样你的数据访问代码和业务逻辑代码之间会有松散的耦合,所以如果你需要再次替换DB, 你将只替换DAL实现并且不要触摸 BLL 代码