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

Recent Posts

  • Java Compact Source File: No Class, No Static Main
  • Java Scoped Values Example
  • Spring Boot RAG Example with Spring AI
  • Java AtomicInteger Example
  • Java Virtual Threads Example
  • Spring Boot Supabase CRUD Example
  • Spring Boot REST Docs Example
  • How to Install Java on Windows (Step-by-Step Guide)

© 2008–2026 mkyong.com

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