{"id":156,"date":"2019-06-19T16:00:19","date_gmt":"2019-06-19T16:00:19","guid":{"rendered":"https:\/\/www.kindsonthegenius.com\/spring-boot\/?p=156"},"modified":"2019-08-31T11:50:28","modified_gmt":"2019-08-31T11:50:28","slug":"spring-boot-using-h2-database","status":"publish","type":"post","link":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/","title":{"rendered":"Spring Boot \u2013 Using H2 Database"},"content":{"rendered":"<p>In this I would teach you how to save data to database using H2 database. Remember, that previously we have hardcoded the list of items. Later we used CrudRepository. But we don&#8217;t have nay initial data. In this lesson we would:<\/p>\n<ul>\n<li>add support for the H2 database (dependencies)<\/li>\n<li>access the H2 GUI (h2-console)<\/li>\n<li>write SQL query to add the initial data<\/li>\n<\/ul>\n<p>First let me give you a brief overview of the H2 database.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>About H2 In-Memory Database<\/strong><\/p>\n<p>First, an in-memory database is a database that resides in the classpath. That it in main memory, not in disk. H2 is called the Java SQL database. It is a relational database system written in Java. Therefore it is embeddable into Java applications. Other in memory databases includes:<\/p>\n<ul>\n<li>Apache Derb<\/li>\n<li>ArangoDB<\/li>\n<li>HSQLDB<\/li>\n<li>Hazelcast<\/li>\n<li>Others&#8230;<\/li>\n<\/ul>\n<p><strong>Benefits of H2<\/strong><\/p>\n<ul>\n<li>Open Source<\/li>\n<li>Faster than conventional RDBMS<\/li>\n<li>Provides a GUI called H2-Console accessible through the browser<\/li>\n<li>Lightweight<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Before we add support for H2, take a look at the architecture of the application to understand the relationship between Controller, Service and Repository:<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-161 \" src=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/Business-Service-Controller-and-Repository.jpg\" alt=\"Business Service, Controller and Repository\" width=\"366\" height=\"447\" srcset=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/Business-Service-Controller-and-Repository.jpg 463w, https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/Business-Service-Controller-and-Repository-246x300.jpg 246w\" sizes=\"auto, (max-width: 366px) 100vw, 366px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Add Support for H2 Database<\/strong><\/p>\n<p>The first step is to add the support for the H2 database. Now, H2 is an in-memory database that resides in the class path.<\/p>\n<ol>\n<li>Add the following dependencies to the pom.xml<\/li>\n<\/ol>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #007700;\">&lt;dependency&gt;<\/span>\r\n\t<span style=\"color: #007700;\">&lt;groupId&gt;<\/span>com.h2database<span style=\"color: #007700;\">&lt;\/groupId&gt;<\/span>\r\n\t<span style=\"color: #007700;\">&lt;artifactId&gt;<\/span>h2<span style=\"color: #007700;\">&lt;\/artifactId&gt;<\/span>\r\n\t<span style=\"color: #007700;\">&lt;scope&gt;<\/span>runtime<span style=\"color: #007700;\">&lt;\/scope&gt;<\/span>\r\n<span style=\"color: #007700;\">&lt;\/dependency&gt;<\/span>\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>2. Add the following to the application.properties file<\/p>\n<p>&nbsp;<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\">spring<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">h2<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">console<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">enabled<\/span><span style=\"color: #333333;\">=<\/span><span style=\"color: #008800; font-weight: bold;\">true<\/span>\r\nspring<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">jpa.hibernate.ddl-auto<\/span><span style=\"color: #333333;\">=update<\/span>\r\nspring<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">datasource<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">platform<\/span><span style=\"color: #333333;\">=<\/span>h2 \r\nspring<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">datasource<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">url<\/span><span style=\"color: #333333;\">=<\/span><span style=\"color: #997700; font-weight: bold;\">jdbc:h2:mem:<\/span>socialdb\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>3. Test the application.<\/p>\n<p>4. Go to <strong>http:\/\/localhost:8080\/h2-console<\/strong>. You will get the H2 Console login window as shown below.<\/p>\n<figure id=\"attachment_158\" aria-describedby=\"caption-attachment-158\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/H2-Console.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-158 size-medium\" src=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/H2-Console-300x232.jpg\" alt=\"H2 Console\" width=\"300\" height=\"232\" srcset=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/H2-Console-300x232.jpg 300w, https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/H2-Console-768x593.jpg 768w, https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/H2-Console.jpg 886w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-158\" class=\"wp-caption-text\">H2 Console<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>5. Make sure that the JDBC URL is set correctly. The name of the database should be the same as the one specified in the application.properties file.<\/p>\n<p>6. Click on Test Connection.<\/p>\n<p>7. Then click on Connect. The database console opens as shown below<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_159\" aria-describedby=\"caption-attachment-159\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-159 size-medium\" src=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/H2-Console-Window-300x204.jpg\" alt=\"H2 Console Window\" width=\"300\" height=\"204\" srcset=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/H2-Console-Window-300x204.jpg 300w, https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/H2-Console-Window-768x522.jpg 768w, https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/H2-Console-Window-1024x696.jpg 1024w, https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/H2-Console-Window.jpg 1530w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-159\" class=\"wp-caption-text\">H2 Console Window<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>To take the next step, you have to stop the server<\/p>\n<p>8. Create a file in the src\/main\/resources folder named data.sql.<\/p>\n<p>9. Write queries to insert some initial data into the locations table. The content is as below.<\/p>\n<p>10. Then save the file. Then relaunch the application. Access the H2 Console and check that the data is inserted into the database.<\/p>\n<p>11. Next try to use the Edit button in the H2 Console to add some records into the database<\/p>\n<p>&nbsp;<\/p>\n<p>We are not done yet!<\/p>\n<p>In the next lesson we would continue with relationships and query methods. Fell free to watch the video if you miss something. Also try to reach me if you have some challenges following the lesson. Leave a comment in the video comment section.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>In this I would teach you how to save data to database using H2 database. Remember, that previously we have hardcoded the list of items. &hellip; <!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":162,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[11,12],"class_list":["post-156","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spring-boot-tutorials","tag-h2-database","tag-h2-console"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Boot \u2013 Using H2 Database - Learn Spring Boot<\/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.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Boot \u2013 Using H2 Database - Learn Spring Boot\" \/>\n<meta property=\"og:description\" content=\"In this I would teach you how to save data to database using H2 database. Remember, that previously we have hardcoded the list of items. &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn Spring Boot\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-19T16:00:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-31T11:50:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/Using-the-H2-Database.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"746\" \/>\n\t<meta property=\"og:image:height\" content=\"401\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"kindsonthegenius\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"kindsonthegenius\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/\"},\"author\":{\"name\":\"kindsonthegenius\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/#\\\/schema\\\/person\\\/7f8fc5792578d2ff54003fcebe6c46b5\"},\"headline\":\"Spring Boot \u2013 Using H2 Database\",\"datePublished\":\"2019-06-19T16:00:19+00:00\",\"dateModified\":\"2019-08-31T11:50:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/\"},\"wordCount\":446,\"commentCount\":3,\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/wp-content\\\/uploads\\\/sites\\\/7\\\/2019\\\/06\\\/Using-the-H2-Database.jpg\",\"keywords\":[\"H2 Database\",\"h2-console\"],\"articleSection\":[\"Spring Boot Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/\",\"name\":\"Spring Boot \u2013 Using H2 Database - Learn Spring Boot\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/wp-content\\\/uploads\\\/sites\\\/7\\\/2019\\\/06\\\/Using-the-H2-Database.jpg\",\"datePublished\":\"2019-06-19T16:00:19+00:00\",\"dateModified\":\"2019-08-31T11:50:28+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/#\\\/schema\\\/person\\\/7f8fc5792578d2ff54003fcebe6c46b5\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/wp-content\\\/uploads\\\/sites\\\/7\\\/2019\\\/06\\\/Using-the-H2-Database.jpg\",\"contentUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/wp-content\\\/uploads\\\/sites\\\/7\\\/2019\\\/06\\\/Using-the-H2-Database.jpg\",\"width\":746,\"height\":401,\"caption\":\"Using the H2 Database\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/spring-boot-using-h2-database\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spring Boot \u2013 Using H2 Database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/#website\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/\",\"name\":\"Learn Spring Boot\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/#\\\/schema\\\/person\\\/7f8fc5792578d2ff54003fcebe6c46b5\",\"name\":\"kindsonthegenius\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"caption\":\"kindsonthegenius\"},\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/author\\\/kindsonthegenius-3\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Boot \u2013 Using H2 Database - Learn Spring Boot","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.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/","og_locale":"en_US","og_type":"article","og_title":"Spring Boot \u2013 Using H2 Database - Learn Spring Boot","og_description":"In this I would teach you how to save data to database using H2 database. Remember, that previously we have hardcoded the list of items. &hellip;","og_url":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/","og_site_name":"Learn Spring Boot","article_published_time":"2019-06-19T16:00:19+00:00","article_modified_time":"2019-08-31T11:50:28+00:00","og_image":[{"width":746,"height":401,"url":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/Using-the-H2-Database.jpg","type":"image\/jpeg"}],"author":"kindsonthegenius","twitter_card":"summary_large_image","twitter_misc":{"Written by":"kindsonthegenius","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/#article","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/"},"author":{"name":"kindsonthegenius","@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/#\/schema\/person\/7f8fc5792578d2ff54003fcebe6c46b5"},"headline":"Spring Boot \u2013 Using H2 Database","datePublished":"2019-06-19T16:00:19+00:00","dateModified":"2019-08-31T11:50:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/"},"wordCount":446,"commentCount":3,"image":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/Using-the-H2-Database.jpg","keywords":["H2 Database","h2-console"],"articleSection":["Spring Boot Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/","url":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/","name":"Spring Boot \u2013 Using H2 Database - Learn Spring Boot","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/#primaryimage"},"image":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/Using-the-H2-Database.jpg","datePublished":"2019-06-19T16:00:19+00:00","dateModified":"2019-08-31T11:50:28+00:00","author":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/#\/schema\/person\/7f8fc5792578d2ff54003fcebe6c46b5"},"breadcrumb":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/#primaryimage","url":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/Using-the-H2-Database.jpg","contentUrl":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/06\/Using-the-H2-Database.jpg","width":746,"height":401,"caption":"Using the H2 Database"},{"@type":"BreadcrumbList","@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/spring-boot-using-h2-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.kindsonthegenius.com\/spring-boot\/"},{"@type":"ListItem","position":2,"name":"Spring Boot \u2013 Using H2 Database"}]},{"@type":"WebSite","@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/#website","url":"https:\/\/www.kindsonthegenius.com\/spring-boot\/","name":"Learn Spring Boot","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.kindsonthegenius.com\/spring-boot\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/#\/schema\/person\/7f8fc5792578d2ff54003fcebe6c46b5","name":"kindsonthegenius","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","caption":"kindsonthegenius"},"url":"https:\/\/www.kindsonthegenius.com\/spring-boot\/author\/kindsonthegenius-3\/"}]}},"_links":{"self":[{"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/posts\/156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/comments?post=156"}],"version-history":[{"count":6,"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/posts\/156\/revisions"}],"predecessor-version":[{"id":174,"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/posts\/156\/revisions\/174"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/media\/162"}],"wp:attachment":[{"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/media?parent=156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/categories?post=156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/tags?post=156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}