Skip to content

mkyong.com

  • Spring Boot
  • Java Virtual Threads
  • Contact
  1. Home /
  2. save

Tag: save

m
mongodb May 9, 2011 3 min read by mkyong 15 comments

Java MongoDB : Insert a document

In this tutorial, we show you 4 ways to insert below JSON data into a “document“, via Java MongoDB API. Test Data Test data in JSON format. { "database" : "mkyongDB", "table" : "hosting", "detail" : { records : 99, index : "vps_index1", active : "true" } } } 1. BasicDBObject example BasicDBObject document = […]

Read more Java MongoDB : Insert a document

Java and Spring tutorials since 2008. Every example is a complete, runnable file, compiled and run on a real machine before it goes out.

About This Site

  • About
  • Editorial Policy
  • Contact
  • Code License
  • Privacy Policy
  • Terms of Use

© 2026 mkyong.com — Powered by WordPress

RSS