{"id":4572,"date":"2018-05-31T15:56:47","date_gmt":"2018-05-31T10:26:47","guid":{"rendered":"https:\/\/www.innovationm.com\/blog\/?p=4572"},"modified":"2023-01-20T18:55:42","modified_gmt":"2023-01-20T13:25:42","slug":"mongodb-integration-with-java","status":"publish","type":"post","link":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/","title":{"rendered":"MongoDB Integration with Java"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">In this tutorial, we will discuss about how to integrate mongoDB with java client.<\/span><\/p>\n<h2><strong>1. What is MongoDB ?<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">MongoDB is a very popular NoSql open source database. It works on collection rather than table and document rather than row and column <\/span><span style=\"font-weight: 400;\">that provides, high performance, high availability, and easy scalability<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><b>Sample document :<\/b><\/p>\n<pre class=\"lang:java decode:true\">{\r\n\r\n\u00a0\u00a0\u00a0\"_id\" : ObjectId(\"5b0d226b31a5f6595a7034de\"),\r\n\r\n\u00a0\u00a0\u00a0\"firstName\" : \"Dharam\",\r\n\r\n\u00a0\u00a0\u00a0\"lastName\" : \"Rajput\"\r\n\r\n}<\/pre>\n<p><strong>1.1<\/strong><b> What we\u2019ll need<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">MongoDB 3.6<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">MongoDB-Java-Driver 2.10.1<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">JDK 1.8<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Maven 3.0.3<\/span><\/li>\n<\/ul>\n<h4><strong>1.2 <\/strong><b>\u00a0Required dependencies<\/b><\/h4>\n<pre class=\"lang:xhtml decode:true\">&lt;dependencies&gt;\r\n&lt;dependency&gt;\r\n&lt;groupId&gt;org.mongodb&lt;\/groupId&gt;\r\n&lt;artifactId&gt;mongo-java-driver&lt;\/artifactId&gt;\r\n&lt;version&gt;2.10.1&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n\u00a0&lt;\/dependencies&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">Now let\u2019s start \u00a0implementation of mongo query with java, We \u00a0will start with CRUD operations.<\/span><\/p>\n<h2><strong>2.Connection with MongoClient<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">If we use MongoDB version less than 2.10.0 then we use MongoDB server but we are using greater version so we will use MongoClient to make connection with mongoDB.<\/span><\/p>\n<pre class=\"lang:java decode:true\">MongoClient mongo = new MongoClient( \"localhost\" , 27017 );\r\n\r\n\/\/ If we use older version than\r\n\r\nMongo mongo = new Mongo(\"localhost\", 27017);<\/pre>\n<h2><b>3. Connection with database<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Now connect with database , if our database doesn\u2019t exist than mongo will create new databse.<\/span><\/p>\n<pre class=\"lang:java decode:true\">DB database = mongoClient.getDB(\"testdb\");<\/pre>\n<p><span style=\"font-weight: 400;\">If we are using mongo in secure mode than authentication is required<\/span><\/p>\n<pre class=\"lang:java decode:true\">MongoClient mongoClient = new MongoClient();\r\nDB database = mongoClient.getDB(\"testdb\"); \/\/ testdb is db name\r\nboolean auth = database.authenticate(\"username\", \"password\".toCharArray());<\/pre>\n<p><span style=\"font-weight: 400;\">Check which database is already exist with following code<\/span><span style=\"font-weight: 400;\">. <\/span><\/p>\n<pre class=\"lang:java decode:true\">mongoClient.getDatabaseNames().forEach(System.out::println);<\/pre>\n<h2><b>4. Mongo Collection<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Now create collection which is equivalent to <\/span><b>table <\/b><span style=\"font-weight: 400;\">in RDBMS. We can make collection as:<\/span><\/p>\n<pre class=\"lang:java decode:true\">database.createCollection(\"users\", null);<\/pre>\n<p><span style=\"font-weight: 400;\">Get and print all existing collection for selected DB.<\/span><\/p>\n<pre class=\"lang:java decode:true \">database.getCollectionNames().forEach(System.out::println);<\/pre>\n<h2><b>5. Insert Document<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Now we will save a document (data) in collection (table).<\/span><\/p>\n<pre class=\"lang:java decode:true\">DBCollection table = db.getCollection(\"users\");\r\nBasicDBObject document = new BasicDBObject();\r\ndocument.put(\"firstName\", \"Dharam\");\r\ndocument.put(\"lastName\", \"Rajput\");\r\n\r\ntable.insert(document);\r\n\r\n<\/pre>\n<p><span style=\"font-weight: 400;\">Now One document has been inserted in database.<\/span><\/p>\n<pre class=\"lang:xhtml decode:true\">{\r\n\r\n\u00a0\u00a0\u00a0\"_id\" : ObjectId(\"5b0d226b31a5f6595a7034de\"),\r\n\r\n\u00a0\u00a0\u00a0\"firstName\" : \"Dharam\",\r\n\r\n\u00a0\u00a0\u00a0\"lastName\" : \"Rajput\"\r\n\r\n}<\/pre>\n<h2><b>6. Update Document<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Let\u2019s assume we have following document<\/span><\/p>\n<pre class=\"lang:xhtml decode:true\">{\r\n\r\n\u00a0\u00a0\u00a0\"_id\" : ObjectId(\"5b0d226b31a5f6595a7034de\"),\r\n\r\n\u00a0\u00a0\u00a0\"firstName\" : \"Dharam\",\r\n\r\n\u00a0\u00a0\u00a0\"lastName\" : \"Rajput\"\r\n\r\n}<\/pre>\n<p><span style=\"font-weight: 400;\">And we want to change <\/span><span style=\"font-weight: 400;\">First-Name of this document.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">First search document where name=&#8221;Dharam&#8221; and update it with new values &#8220;Dharmendra&#8221;<\/span><\/p>\n<pre class=\"lang:java decode:true\">BasicDBObject query = new BasicDBObject();\r\nquery.put(\"firstName\", \"Dharam\");\r\nBasicDBObject newDocument = new BasicDBObject();\r\nnewDocument.put(\"firstName\", \"Dharmendra\");\r\nBasicDBObject updateObj = new BasicDBObject();\r\n\r\nupdateObj.put(\"$set\", newDocument);<\/pre>\n<h2><strong>7. Find \u00a0Document in Collection<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Search a document where \u201cfirstName = <\/span><span style=\"font-weight: 400;\">Dharmendra\u201d in user collection<\/span><\/p>\n<pre class=\"lang:java decode:true\">DBCollection db= db.getCollection(\"user\");\r\n\r\nBasicDBObject searchQuery = new BasicDBObject();\r\nsearchQuery.put(\"firstName\", \"Dharmendra\");\r\nDBCursor cursor = db.find(searchQuery);\r\nwhile (cursor.hasNext()) {\r\nSystem.out.println(cursor.next());\r\n}<\/pre>\n<h2><b>8. Delete \u00a0Document<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Delete a document where \u201cfirstName = <\/span><span style=\"font-weight: 400;\">Dharmendra<\/span><span style=\"font-weight: 400;\">\u201d .<\/span><\/p>\n<pre class=\"lang:java decode:true\">DBCollection db= db.getCollection(\"user\");\r\nBasicDBObject searchQuery = new BasicDBObject();\r\nsearchQuery.put(\"name\", \"mkyong\");\r\ndb.remove(searchQuery);\r\n\r\n<\/pre>\n<p><span style=\"font-weight: 400;\">This tutorial was the quick introduction of mongodb with java.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now find the complete code of mongoDB integration with java here. <\/span><\/p>\n<pre class=\"lang:java decode:true\" title=\"TestDB.Java\">package com.demo.mongodb;\r\n\r\nimport com.mongodb.BasicDBObject;\r\nimport com.mongodb.DB;\r\nimport com.mongodb.DBCollection;\r\nimport com.mongodb.DBCursor;\r\nimport com.mongodb.MongoClient;\r\n\r\npublic class TestDB {\r\n\r\npublic static void main(String[] args) {\r\n\r\ntry {\r\n\/**** Connect to MongoDB ****\/\r\n\/\/ Since 2.10.0, uses MongoClient\r\nMongoClient mongoClient = new MongoClient(\"localhost\", 27017);\r\n\r\n\/**** Get database ****\/\r\n\/\/ if database doesn't exists, MongoDB will create it for you\r\n\r\nDB db = mongoClient.getDB(\"testdb\");\r\nmongoClient.getDatabaseNames().forEach(System.out::println);\r\n\r\n\/**** Get collection \/ table from 'testdb' ****\/\r\n\r\n\/\/ if collection doesn't exists, MongoDB will create it for you\r\n\r\nDBCollection collection = db.getCollection(\"users\");\r\n\r\n\/**** Insert ****\/\r\n\r\n\/\/ create a document to store key and value\r\n\r\nBasicDBObject document = new BasicDBObject();\r\n\r\ndocument.put(\"firstName\", \"Dharam\");\r\n\r\ndocument.put(\"lastName\", \"Rajput\");\r\n\r\ncollection.insert(document);\r\n\r\n\/**** Find and display ****\/\r\n\r\nBasicDBObject searchQuery = new BasicDBObject();\r\n\r\nsearchQuery.put(\"firstName\", \"Dharam\");\r\n\r\nDBCursor dbCursor = collection.find(searchQuery);\r\nwhile (dbCursor.hasNext()) {\r\n\r\nSystem.out.println(dbCursor.next());\r\n\r\n}\r\n\r\n\/**** Update ****\/\r\n\r\n\/\/ search document where name=\"Dharam\" and update it with new values \"Dharmendra\"\r\n\r\nBasicDBObject dbQuery = new BasicDBObject();\r\n\r\ndbQuery.put(\"firstName\", \"Dharam\");\r\n\r\nBasicDBObject newDocument = new BasicDBObject();\r\n\r\nnewDocument.put(\"firstName\", \"Dharmendra\");\r\n\r\nBasicDBObject updateObj = new BasicDBObject();\r\n\r\nupdateObj.put(\"$set\", newDocument);\r\n\r\ncollection.update(dbQuery, updateObj);\r\n\r\n\/**** Find and display ****\/\r\n\r\nBasicDBObject findQuery\r\n\r\n&amp;nbsp;&amp;nbsp;&amp;nbsp;= new BasicDBObject().append(\"firstName\", \"Dharmendra\");\r\n\r\nDBCursor findCursor = collection.find(findQuery);\r\n\r\nwhile (findCursor.hasNext()) {\r\n\r\nSystem.out.println(findCursor.next());\r\n\r\n}\r\n\r\n&amp;nbsp;&amp;nbsp;&amp;nbsp;} catch (Exception e) {\r\n\r\ne.printStackTrace();\r\n\r\n&amp;nbsp;}\r\n\r\n}\r\n\r\n}<\/pre>\n<p>Hope you liked the tutorial on how to integrate MongoDB with Java client. If you have any queries, feel free to <a href=\"https:\/\/www.innovationm.com\/contact-us\">contact us<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will discuss about how to integrate mongoDB with java client. 1. What is MongoDB ? MongoDB is a very popular NoSql open source database. It works on collection rather than table and document rather than row and column that provides, high performance, high availability, and easy scalability. Sample document : { [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4576,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[256,71,102],"tags":[269,270,271],"class_list":["post-4572","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java-application","category-mobile","category-web-service","tag-mongodb","tag-nosql","tag-nosql-db"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MongoDB Integration with Java - InnovationM - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MongoDB Integration with Java - InnovationM - Blog\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we will discuss about how to integrate mongoDB with java client. 1. What is MongoDB ? MongoDB is a very popular NoSql open source database. It works on collection rather than table and document rather than row and column that provides, high performance, high availability, and easy scalability. Sample document : { [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/\" \/>\n<meta property=\"og:site_name\" content=\"InnovationM - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-05-31T10:26:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-20T13:25:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2018\/05\/Akash_blog_image-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1136\" \/>\n\t<meta property=\"og:image:height\" content=\"710\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"InnovationM Admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InnovationM Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/\"},\"author\":{\"name\":\"InnovationM Admin\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"headline\":\"MongoDB Integration with Java\",\"datePublished\":\"2018-05-31T10:26:47+00:00\",\"dateModified\":\"2023-01-20T13:25:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/\"},\"wordCount\":294,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/Akash_blog_image-1.png\",\"keywords\":[\"mongodb\",\"NoSql\",\"NoSql DB\"],\"articleSection\":[\"Java Application\",\"Mobile\",\"Web service\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/\",\"name\":\"MongoDB Integration with Java - InnovationM - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/Akash_blog_image-1.png\",\"datePublished\":\"2018-05-31T10:26:47+00:00\",\"dateModified\":\"2023-01-20T13:25:42+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/Akash_blog_image-1.png\",\"contentUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/Akash_blog_image-1.png\",\"width\":1136,\"height\":710},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/mongodb-integration-with-java\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MongoDB Integration with Java\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\",\"name\":\"InnovationM - Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\",\"name\":\"InnovationM Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"caption\":\"InnovationM Admin\"},\"sameAs\":[\"http:\\\/\\\/www.innovationm.com\\\/\"],\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/author\\\/innovationmadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MongoDB Integration with Java - InnovationM - Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/","og_locale":"en_US","og_type":"article","og_title":"MongoDB Integration with Java - InnovationM - Blog","og_description":"In this tutorial, we will discuss about how to integrate mongoDB with java client. 1. What is MongoDB ? MongoDB is a very popular NoSql open source database. It works on collection rather than table and document rather than row and column that provides, high performance, high availability, and easy scalability. Sample document : { [&hellip;]","og_url":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/","og_site_name":"InnovationM - Blog","article_published_time":"2018-05-31T10:26:47+00:00","article_modified_time":"2023-01-20T13:25:42+00:00","og_image":[{"width":1136,"height":710,"url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2018\/05\/Akash_blog_image-1.png","type":"image\/png"}],"author":"InnovationM Admin","twitter_misc":{"Written by":"InnovationM Admin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/#article","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/"},"author":{"name":"InnovationM Admin","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"headline":"MongoDB Integration with Java","datePublished":"2018-05-31T10:26:47+00:00","dateModified":"2023-01-20T13:25:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/"},"wordCount":294,"commentCount":0,"image":{"@id":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2018\/05\/Akash_blog_image-1.png","keywords":["mongodb","NoSql","NoSql DB"],"articleSection":["Java Application","Mobile","Web service"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/","url":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/","name":"MongoDB Integration with Java - InnovationM - Blog","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/#primaryimage"},"image":{"@id":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2018\/05\/Akash_blog_image-1.png","datePublished":"2018-05-31T10:26:47+00:00","dateModified":"2023-01-20T13:25:42+00:00","author":{"@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"breadcrumb":{"@id":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/#primaryimage","url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2018\/05\/Akash_blog_image-1.png","contentUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2018\/05\/Akash_blog_image-1.png","width":1136,"height":710},{"@type":"BreadcrumbList","@id":"https:\/\/www.innovationm.com\/blog\/mongodb-integration-with-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.innovationm.com\/blog\/"},{"@type":"ListItem","position":2,"name":"MongoDB Integration with Java"}]},{"@type":"WebSite","@id":"https:\/\/www.innovationm.com\/blog\/#website","url":"https:\/\/www.innovationm.com\/blog\/","name":"InnovationM - Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.innovationm.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed","name":"InnovationM Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","caption":"InnovationM Admin"},"sameAs":["http:\/\/www.innovationm.com\/"],"url":"https:\/\/www.innovationm.com\/blog\/author\/innovationmadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/4572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/comments?post=4572"}],"version-history":[{"count":0,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/4572\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media\/4576"}],"wp:attachment":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media?parent=4572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/categories?post=4572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/tags?post=4572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}