{"id":25796,"date":"2014-05-27T07:00:02","date_gmt":"2014-05-27T04:00:02","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=25796"},"modified":"2014-05-26T11:55:13","modified_gmt":"2014-05-26T08:55:13","slug":"spring-rest-controller-with-angularjs-resource","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html","title":{"rendered":"Spring Rest Controller with angularjs resource"},"content":{"rendered":"<p>Angularjs <a href=\"https:\/\/docs.angularjs.org\/api\/ngResource\">ngResource<\/a> is an angularjs module for interacting with REST based services. I used it recently for a small project with <a href=\"http:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/html\/mvc.html#mvc-ann-restcontroller\">Spring MVC <\/a> and wanted to document a configuration that worked well for me.<\/p>\n<p>The controller is run of the mill, it supports CRUD operations on a Hotel entity and supports the following methods:<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<ul>\n<li>POST \/rest\/hotels &#8211; creates a Hotel entity<\/li>\n<li>GET \/rest\/hotels &#8211; gets the list of Hotel entities<\/li>\n<li>GET \/rest\/hotels\/:id &#8211; retrieves an entity with specified Id<\/li>\n<li>PUT \/rest\/hotels\/:id &#8211; updates an entity<\/li>\n<li>DELETE \/rest\/hotels\/:id &#8211; deletes an entity with the specified id<\/li>\n<\/ul>\n<p>This can implemented in the following way using Spring MVC:<\/p>\n<pre class=\" brush:java\">@RestController\r\n@RequestMapping(\"\/rest\/hotels\")\r\npublic class RestHotelController {\r\n private HotelRepository hotelRepository;\r\n \r\n @Autowired\r\n public RestHotelController(HotelRepository hotelRepository) {\r\n  this.hotelRepository = hotelRepository;\r\n }\r\n\r\n @RequestMapping(method=RequestMethod.POST)\r\n public Hotel create(@RequestBody @Valid Hotel hotel) {\r\n  return this.hotelRepository.save(hotel);\r\n }\r\n\r\n @RequestMapping(method=RequestMethod.GET)\r\n public List&lt;Hotel&gt; list() {\r\n  return this.hotelRepository.findAll();\r\n }\r\n\r\n @RequestMapping(value=\"\/{id}\", method=RequestMethod.GET)\r\n public Hotel get(@PathVariable(\"id\") long id) {\r\n  return this.hotelRepository.findOne(id);\r\n }\r\n \r\n @RequestMapping(value=\"\/{id}\", method=RequestMethod.PUT)\r\n public Hotel update(@PathVariable(\"id\") long id, @RequestBody @Valid Hotel hotel) {\r\n  return hotelRepository.save(hotel);\r\n }\r\n \r\n @RequestMapping(value=\"\/{id}\", method=RequestMethod.DELETE)\r\n public ResponseEntity&lt;Boolean&gt; delete(@PathVariable(\"id\") long id) {\r\n  this.hotelRepository.delete(id);\r\n  return new ResponseEntity&lt;Boolean&gt;(Boolean.TRUE, HttpStatus.OK);\r\n }\r\n}<\/pre>\n<p>Note the @RestController annotation, this is a new annotation introduced with Spring Framework 4.0, with this annotation specified on the controller, the @ResponseBody annotation on each of the methods can be avoided.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>On the angularjs side, the ngResource module can be configured in a factory the following way, to consume this service:<\/p>\n<pre class=\" brush:java\">app.factory(\"Hotel\", function ($resource) {\r\n    return $resource(\"\/rest\/hotels\", {id: \"@id\"}, {\r\n        update: {\r\n            method: 'PUT'\r\n        }\r\n    });\r\n});<\/pre>\n<p>The only change to the default configuration is in specifying the additional &#8220;update&#8221; action with the Http method of PUT instead of POST. With this change, the REST API can be accessed the following way:<\/p>\n<p>POST \/rest\/hotels translates to:<\/p>\n<pre class=\" brush:java\">var hotel = new Hotel({name:\"test\",address:\"test address\", zip:\"0001\"});\r\nhotel.$save();<\/pre>\n<p>Or another variation of this:<\/p>\n<pre class=\" brush:java\">Hotel.save({}, {name:\"test\",address:\"test address\", zip:\"0001\"});<\/pre>\n<p>GET \/rest\/hotels translates to :<\/p>\n<pre class=\" brush:java\">Hotel.query();<\/pre>\n<p>GET \/rest\/hotels\/:id translates to :<\/p>\n<pre class=\" brush:java\">Hotel.get({id:1})<\/pre>\n<p>PUT \/rest\/hotels\/:id translates to :<\/p>\n<pre class=\" brush:java\">var hotel = new Hotel({id:1, name:\"test\",address:\"test address\", zip:\"0001\"});\r\nhotel.$update();<\/pre>\n<p>DELETE \/rest\/hotels\/:id translates to:<\/p>\n<pre class=\" brush:java\">var hotel = new Hotel({id:1});\r\nhotel.$delete();<\/pre>\n<p>OR<\/p>\n<pre class=\" brush:java\">Hotel.delete({id:1});<\/pre>\n<p>To handle successful and failure outcomes just pass in additional callback handlers:<\/p>\n<p>for eg. with create:<\/p>\n<pre class=\" brush:java\">var hotel = new Hotel({name:\"test\",address:\"test address\", zip:\"0001\"});\r\nhotel.$save({},function(response){\r\n  \/\/on success\r\n}, function(failedResponse){\r\n  \/\/on failure\r\n});<\/pre>\n<ul>\n<li>A complete CRUD working sample with angularjs and Spring MVC is available at <a href=\"https:\/\/github.com\/bijukunjummen\/spring-boot-mvc-test\/tree\/withangular\">this github<\/a> location: https:\/\/github.com\/bijukunjummen\/spring-boot-mvc-test\/tree\/withangular<\/li>\n<\/ul>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/www.java-allandsundry.com\/2014\/05\/spring-rest-controller-with-angularjs.html\">Spring Rest Controller with angularjs resource<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Biju Kunjummen at the <a href=\"http:\/\/www.java-allandsundry.com\/\">all and sundry<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Angularjs ngResource is an angularjs module for interacting with REST based services. I used it recently for a small project with Spring MVC and wanted to document a configuration that worked well for me. The controller is run of the mill, it supports CRUD operations on a Hotel entity and supports the following methods: &nbsp; &hellip;<\/p>\n","protected":false},"author":236,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[953,54,30],"class_list":["post-25796","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-angular-js","tag-restful-web-services","tag-spring"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Rest Controller with angularjs resource<\/title>\n<meta name=\"description\" content=\"Angularjs ngResource is an angularjs module for interacting with REST based services. I used it recently for a small project with Spring MVC and wanted to\" \/>\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.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Rest Controller with angularjs resource\" \/>\n<meta property=\"og:description\" content=\"Angularjs ngResource is an angularjs module for interacting with REST based services. I used it recently for a small project with Spring MVC and wanted to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-05-27T04:00:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Biju Kunjummen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Biju Kunjummen\" \/>\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.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html\"},\"author\":{\"name\":\"Biju Kunjummen\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/802eedfe6f17c3c13fa656af46b6b0e5\"},\"headline\":\"Spring Rest Controller with angularjs resource\",\"datePublished\":\"2014-05-27T04:00:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html\"},\"wordCount\":302,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"keywords\":[\"Angular.js\",\"RESTful Web Services\",\"Spring\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html\",\"name\":\"Spring Rest Controller with angularjs resource\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"datePublished\":\"2014-05-27T04:00:02+00:00\",\"description\":\"Angularjs ngResource is an angularjs module for interacting with REST based services. I used it recently for a small project with Spring MVC and wanted to\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"spring-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/05\\\/spring-rest-controller-with-angularjs-resource.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring Rest Controller with angularjs resource\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/802eedfe6f17c3c13fa656af46b6b0e5\",\"name\":\"Biju Kunjummen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g\",\"caption\":\"Biju Kunjummen\"},\"sameAs\":[\"http:\\\/\\\/biju-allandsundry.blogspot.com\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Biju-Kunjummen\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Rest Controller with angularjs resource","description":"Angularjs ngResource is an angularjs module for interacting with REST based services. I used it recently for a small project with Spring MVC and wanted to","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.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html","og_locale":"en_US","og_type":"article","og_title":"Spring Rest Controller with angularjs resource","og_description":"Angularjs ngResource is an angularjs module for interacting with REST based services. I used it recently for a small project with Spring MVC and wanted to","og_url":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2014-05-27T04:00:02+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Biju Kunjummen","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Biju Kunjummen","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html"},"author":{"name":"Biju Kunjummen","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/802eedfe6f17c3c13fa656af46b6b0e5"},"headline":"Spring Rest Controller with angularjs resource","datePublished":"2014-05-27T04:00:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html"},"wordCount":302,"commentCount":3,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","keywords":["Angular.js","RESTful Web Services","Spring"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html","url":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html","name":"Spring Rest Controller with angularjs resource","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","datePublished":"2014-05-27T04:00:02+00:00","description":"Angularjs ngResource is an angularjs module for interacting with REST based services. I used it recently for a small project with Spring MVC and wanted to","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","width":150,"height":150,"caption":"spring-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2014\/05\/spring-rest-controller-with-angularjs-resource.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring Rest Controller with angularjs resource"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/802eedfe6f17c3c13fa656af46b6b0e5","name":"Biju Kunjummen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g","caption":"Biju Kunjummen"},"sameAs":["http:\/\/biju-allandsundry.blogspot.com"],"url":"https:\/\/www.javacodegeeks.com\/author\/Biju-Kunjummen"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/25796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/236"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=25796"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/25796\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=25796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=25796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=25796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}