{"id":62,"date":"2019-02-24T23:00:12","date_gmt":"2019-02-24T23:00:12","guid":{"rendered":"https:\/\/www.kindsonthegenius.com\/spring-boot\/?p=62"},"modified":"2019-03-02T04:07:16","modified_gmt":"2019-03-02T04:07:16","slug":"06-spring-boot-build-a-rest-api","status":"publish","type":"post","link":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/","title":{"rendered":"Spring Boot &#8211; Build a REST API"},"content":{"rendered":"<p>In this tutorial, we would would outline the steps to Build a REST API. We would also plan the various components of out REST API.<\/p>\n<p>As a reminder, an API(Application Programming Interface) allows exposes functionality of an application to other applications. So as a programmer, you&#8217;ll spend most of your time building APIs.<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li><a href=\"#t1\">About the API we&#8217;ll Build<\/a><\/li>\n<li><a href=\"#t2\">Create the User&#8217;s Class<\/a><\/li>\n<li><a href=\"#t3\">Create the Location Class<\/a><\/li>\n<li><a href=\"#t4\">Create the Post Class<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=Je5Ffk73K0A\">Watch the Video<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t1\">1. About the API we&#8217;ll Build<\/strong><\/h4>\n<p>So we would build an API for a social network platform. Let&#8217;s call it SocialAPI. This is like a mini Facebook! Although it is small, this is the same principle social networks follow.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Our SocialAPI would contain the following classes:<\/strong><\/p>\n<ul>\n<li>list of users<\/li>\n<li>list of locations<\/li>\n<li>list of posts<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Also, the following relationships would be supported:<\/strong><\/p>\n<ul>\n<li>a user has a location<\/li>\n<li>each location could have 1 or more users<\/li>\n<li>a user could create a post. Hence each user can have one or more posts<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Our SocialAPI would support the following operations:<\/strong><\/p>\n<ul>\n<li>add, delete and update user details<\/li>\n<li>add, delete and update location details<\/li>\n<li>add, delete and update post details<\/li>\n<li>get a list of users or locations<\/li>\n<li>get user or location by id<\/li>\n<li>get list of posts for a particular user<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>The entity relationship diagram for our SocialAPI is shown below.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_63\" aria-describedby=\"caption-attachment-63\" style=\"width: 537px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/02\/Database-Diagram.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-63\" src=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/02\/Database-Diagram.jpg\" alt=\"\" width=\"537\" height=\"347\" srcset=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/02\/Database-Diagram.jpg 852w, https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/02\/Database-Diagram-300x194.jpg 300w, https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/02\/Database-Diagram-768x497.jpg 768w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/a><figcaption id=\"caption-attachment-63\" class=\"wp-caption-text\">Database Diagram for our Social API<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t2\">2. Create the Users Class<\/strong><\/h4>\n<ul>\n<li>First you need to create a package that would contain the User class<\/li>\n<li>Then, inside package create a class and call it user<\/li>\n<li>The content of the User class is shown below. So you can copy and paste. You can also type it out yourself<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">package<\/span> user<span style=\"color: #333333;\">;<\/span>\r\n\r\n<span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #008800; font-weight: bold;\">class<\/span> <span style=\"color: #bb0066; font-weight: bold;\">User<\/span> <span style=\"color: #333333;\">{<\/span>\r\n    <span style=\"color: #008800; font-weight: bold;\">private<\/span> String id<span style=\"color: #333333;\">;<\/span>\r\n    <span style=\"color: #008800; font-weight: bold;\">private<\/span> String firstname<span style=\"color: #333333;\">;<\/span>\r\n    <span style=\"color: #008800; font-weight: bold;\">private<\/span> String lastname<span style=\"color: #333333;\">;<\/span>\r\n    <span style=\"color: #008800; font-weight: bold;\">private<\/span> Location location<span style=\"color: #333333;\">;<\/span>\r\n    <span style=\"color: #008800; font-weight: bold;\">private<\/span> String email<span style=\"color: #333333;\">;<\/span>\r\n\t\t\r\n<span style=\"color: #333333;\">}<\/span>\r\n<\/pre>\n<p>After you have added this code, then you can generate the getters and setters.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t3\">3. Create the Post Class<\/strong><\/h4>\n<ul>\n<li>First you need to create a package that would contain the Post class<\/li>\n<li>Then, inside the course package create a class and call it Post<\/li>\n<li>The content of the Post class is shown below. So you can copy and paste. You can also type it out yourself<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">package<\/span> post<span style=\"color: #333333;\">;<\/span>\r\n\r\n<span style=\"color: #008800; font-weight: bold;\">import<\/span> <span style=\"color: #0e84b5; font-weight: bold;\">user.User<\/span><span style=\"color: #333333;\">;<\/span>\r\n\r\n<span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #008800; font-weight: bold;\">class<\/span> <span style=\"color: #bb0066; font-weight: bold;\">Post<\/span> <span style=\"color: #333333;\">{<\/span>\r\n   <span style=\"color: #008800; font-weight: bold;\">private<\/span> String id<span style=\"color: #333333;\">;<\/span>\r\n   <span style=\"color: #008800; font-weight: bold;\">private<\/span> String postdate<span style=\"color: #333333;\">;<\/span>\r\n   <span style=\"color: #008800; font-weight: bold;\">private<\/span> User user<span style=\"color: #333333;\">;<\/span>\r\n   <span style=\"color: #008800; font-weight: bold;\">private<\/span> String details<span style=\"color: #333333;\">;<\/span>\r\n<span style=\"color: #333333;\">}<\/span>\r\n<\/pre>\n<p>Again, remember to generate the getters and setters for this the User class<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t4\">4. Create the Location Class<\/strong><\/h4>\n<p>It follows the same process<\/p>\n<ul>\n<li>First you need to create a package that would contain the Location class<\/li>\n<li>Then inside the location package create a class and call it Location<\/li>\n<li>The content of the Location class is shown below. So you can copy and paste. You can also type it out yourself<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">package<\/span> location<span style=\"color: #333333;\">;<\/span>\r\n\r\n<span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #008800; font-weight: bold;\">class<\/span> <span style=\"color: #bb0066; font-weight: bold;\">Location<\/span> <span style=\"color: #333333;\">{<\/span>\r\n   <span style=\"color: #008800; font-weight: bold;\">private<\/span> String id<span style=\"color: #333333;\">;<\/span>\r\n   <span style=\"color: #008800; font-weight: bold;\">private<\/span> String name<span style=\"color: #333333;\">;<\/span>\r\n<span style=\"color: #333333;\">}<\/span>\r\n<\/pre>\n<p>Also remember to generate getters and setters. You can watch the video below to see how you can do this.<\/p>\n<p>&nbsp;<\/p>\n<p>So at this point, you have successfully set up the structure of the SocialAPI. So in the next lesson, we would add service to get list of items.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/Je5Ffk73K0A\" width=\"100%\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><\/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 tutorial, we would would outline the steps to Build a REST API. We would also plan the various components of out REST API. &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":64,"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":[],"class_list":["post-62","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spring-boot-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Boot - Build a REST API - 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\/06-spring-boot-build-a-rest-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Boot - Build a REST API - Learn Spring Boot\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we would would outline the steps to Build a REST API. We would also plan the various components of out REST API. &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn Spring Boot\" \/>\n<meta property=\"article:published_time\" content=\"2019-02-24T23:00:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-02T04:07:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/02\/Building-a-REST-API-in-Spring-Boot.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"910\" \/>\n\t<meta property=\"og:image:height\" content=\"542\" \/>\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=\"3 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\\\/06-spring-boot-build-a-rest-api\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/06-spring-boot-build-a-rest-api\\\/\"},\"author\":{\"name\":\"kindsonthegenius\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/#\\\/schema\\\/person\\\/7f8fc5792578d2ff54003fcebe6c46b5\"},\"headline\":\"Spring Boot &#8211; Build a REST API\",\"datePublished\":\"2019-02-24T23:00:12+00:00\",\"dateModified\":\"2019-03-02T04:07:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/06-spring-boot-build-a-rest-api\\\/\"},\"wordCount\":488,\"commentCount\":2,\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/06-spring-boot-build-a-rest-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/wp-content\\\/uploads\\\/sites\\\/7\\\/2019\\\/02\\\/Building-a-REST-API-in-Spring-Boot.jpg\",\"articleSection\":[\"Spring Boot Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/06-spring-boot-build-a-rest-api\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/06-spring-boot-build-a-rest-api\\\/\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/06-spring-boot-build-a-rest-api\\\/\",\"name\":\"Spring Boot - Build a REST API - Learn Spring Boot\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/06-spring-boot-build-a-rest-api\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/06-spring-boot-build-a-rest-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/wp-content\\\/uploads\\\/sites\\\/7\\\/2019\\\/02\\\/Building-a-REST-API-in-Spring-Boot.jpg\",\"datePublished\":\"2019-02-24T23:00:12+00:00\",\"dateModified\":\"2019-03-02T04:07:16+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/#\\\/schema\\\/person\\\/7f8fc5792578d2ff54003fcebe6c46b5\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/06-spring-boot-build-a-rest-api\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/06-spring-boot-build-a-rest-api\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/06-spring-boot-build-a-rest-api\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/wp-content\\\/uploads\\\/sites\\\/7\\\/2019\\\/02\\\/Building-a-REST-API-in-Spring-Boot.jpg\",\"contentUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/wp-content\\\/uploads\\\/sites\\\/7\\\/2019\\\/02\\\/Building-a-REST-API-in-Spring-Boot.jpg\",\"width\":910,\"height\":542,\"caption\":\"Building a REST API in Spring Boot\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/06-spring-boot-build-a-rest-api\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/spring-boot\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spring Boot &#8211; Build a REST API\"}]},{\"@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 - Build a REST API - 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\/06-spring-boot-build-a-rest-api\/","og_locale":"en_US","og_type":"article","og_title":"Spring Boot - Build a REST API - Learn Spring Boot","og_description":"In this tutorial, we would would outline the steps to Build a REST API. We would also plan the various components of out REST API. &hellip;","og_url":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/","og_site_name":"Learn Spring Boot","article_published_time":"2019-02-24T23:00:12+00:00","article_modified_time":"2019-03-02T04:07:16+00:00","og_image":[{"width":910,"height":542,"url":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/02\/Building-a-REST-API-in-Spring-Boot.jpg","type":"image\/jpeg"}],"author":"kindsonthegenius","twitter_card":"summary_large_image","twitter_misc":{"Written by":"kindsonthegenius","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/#article","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/"},"author":{"name":"kindsonthegenius","@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/#\/schema\/person\/7f8fc5792578d2ff54003fcebe6c46b5"},"headline":"Spring Boot &#8211; Build a REST API","datePublished":"2019-02-24T23:00:12+00:00","dateModified":"2019-03-02T04:07:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/"},"wordCount":488,"commentCount":2,"image":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/02\/Building-a-REST-API-in-Spring-Boot.jpg","articleSection":["Spring Boot Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/","url":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/","name":"Spring Boot - Build a REST API - Learn Spring Boot","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/#primaryimage"},"image":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/02\/Building-a-REST-API-in-Spring-Boot.jpg","datePublished":"2019-02-24T23:00:12+00:00","dateModified":"2019-03-02T04:07:16+00:00","author":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/#\/schema\/person\/7f8fc5792578d2ff54003fcebe6c46b5"},"breadcrumb":{"@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/#primaryimage","url":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/02\/Building-a-REST-API-in-Spring-Boot.jpg","contentUrl":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-content\/uploads\/sites\/7\/2019\/02\/Building-a-REST-API-in-Spring-Boot.jpg","width":910,"height":542,"caption":"Building a REST API in Spring Boot"},{"@type":"BreadcrumbList","@id":"https:\/\/www.kindsonthegenius.com\/spring-boot\/06-spring-boot-build-a-rest-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.kindsonthegenius.com\/spring-boot\/"},{"@type":"ListItem","position":2,"name":"Spring Boot &#8211; Build a REST API"}]},{"@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\/62","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=62"}],"version-history":[{"count":5,"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/posts\/62\/revisions"}],"predecessor-version":[{"id":69,"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/posts\/62\/revisions\/69"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/media\/64"}],"wp:attachment":[{"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/media?parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/categories?post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/spring-boot\/wp-json\/wp\/v2\/tags?post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}