{"id":54011,"date":"2021-12-23T10:19:52","date_gmt":"2021-12-23T04:49:52","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=54011"},"modified":"2022-01-13T11:49:34","modified_gmt":"2022-01-13T06:19:34","slug":"groovying-on-template-aid-for-java","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/","title":{"rendered":"Groovying on Template Aid for Java"},"content":{"rendered":"<p>If you haven&#8217;t combined\u00a0<a href=\"https:\/\/groovy-lang.org\/\">Groovy<\/a> scripts with your Java projects yet, you&#8217;re missing out. It&#8217;s super easy with\u00a0<a href=\"https:\/\/maven.apache.org\/\">Maven<\/a>, and it&#8217;ll make your code more modular and elegant. But most importantly, you&#8217;ll have some fun scripting, and if nothing else, you&#8217;ll most certainly benefit from some of the <em>grooviest<\/em> features, including the magic that is\u00a0<a href=\"https:\/\/groovy-lang.org\/syntax.html#all-strings\">Groovy&#8217;s GString<\/a>!<\/p>\n<p>You can check out the code for this tutorial in GITHUB.<\/p>\n<h4><b>The given environment<\/b><\/h4>\n<p>Let&#8217;s say you have a service for connecting customers to representatives via some sort of messaging service. When the customer first reaches out to the service, he should be responded with a standard message (a template) that includes his name, his queue number, and an informational greeting of some sort.<\/p>\n<h4><b>Groovy scripting<\/b><\/h4>\n<p>Create a file as a template for your messages.<\/p>\n<h3><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-54321 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2021\/12\/Blog4-01-scaled.jpg\" alt=\"Blog image\" width=\"2560\" height=\"604\" srcset=\"https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-01-scaled.jpg 2560w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-01-300x71.jpg 300w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-01-1024x242.jpg 1024w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-01-768x181.jpg 768w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-01-1536x363.jpg 1536w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-01-2048x483.jpg 2048w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-01-624x147.jpg 624w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/h3>\n<ul>\n<li>The\u00a0<code>def<\/code>\u00a0statements allow us to bind arguments from the shell.<\/li>\n<li>The\u00a0<code>\"\"\"<\/code>\u00a0marks the text as a\u00a0<code>GString<\/code>, which allows us, in this case to:\n<ul>\n<li>Easily incorporate the arguments with no\u00a0<code>String.format<\/code>\u00a0required.<\/li>\n<li>Produce multi-line strings without worrying about line breaks and long lines.<\/li>\n<\/ul>\n<\/li>\n<li>What you might have noticed missing here, is the\u00a0<code>return<\/code>\u00a0statement. With\u00a0<em>Groovy<\/em>\u00a0the last statement\u00a0<strong>is<\/strong>\u00a0the return statement.<\/li>\n<\/ul>\n<p>Now let&#8217;s invoke the script with some intentionally boiler plated\u00a0<em>Java<\/em>\u00a0code:<\/p>\n<h3><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-54322 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2021\/12\/Blog4-02-scaled.jpg\" alt=\"Blog image\" width=\"2560\" height=\"1644\" srcset=\"https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-02-scaled.jpg 2560w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-02-300x193.jpg 300w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-02-1024x658.jpg 1024w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-02-768x493.jpg 768w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-02-1536x986.jpg 1536w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-02-2048x1315.jpg 2048w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-02-624x401.jpg 624w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/h3>\n<p>Can you see how easy it is to add arguments? Just add them to the script, and add the binding to the invoking class. No more &#8220;scratching your head&#8221; when it comes to concatenating long strings&#8230;<br \/>\nThe real conundrum here is, how do we get the script in our class loader?<\/p>\n<p>It&#8217;s easy with\u00a0<em>Maven<\/em>, let&#8217;s say this is our project layout:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-54324 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2021\/12\/Blog4-03-scaled.jpg\" alt=\"Blog image\" width=\"2560\" height=\"604\" srcset=\"https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-03-scaled.jpg 2560w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-03-300x71.jpg 300w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-03-1024x242.jpg 1024w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-03-768x181.jpg 768w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-03-1536x363.jpg 1536w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-03-2048x483.jpg 2048w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-03-624x147.jpg 624w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/p>\n<p>First, we need to include the <a href=\"https:\/\/mvnrepository.com\/artifact\/org.codehaus.groovy\/groovy\">groovy dependency<\/a>.<\/p>\n<p>Now we have the appropriate\u00a0<em>Groovy<\/em>\u00a0API classes like\u00a0<em>GroovyShell<\/em>\u00a0and\u00a0<em>Binding<\/em>\u00a0in our class loader.<br \/>\nWe now need to add the following to our\u00a0<code>build<\/code>\u00a0section in our\u00a0<code>pom.xml<\/code>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-54325 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2021\/12\/Blog4-04-scaled.jpg\" alt=\"Blog image\" width=\"2560\" height=\"562\" srcset=\"https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-04-scaled.jpg 2560w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-04-300x66.jpg 300w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-04-1024x225.jpg 1024w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-04-768x169.jpg 768w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-04-1536x337.jpg 1536w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-04-2048x450.jpg 2048w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-04-624x137.jpg 624w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/p>\n<p>This will add everything from our\u00a0<code>src\/scripts<\/code>\u00a0folder to our class loader under the folder\u00a0<code>scripts<\/code>.<br \/>\nSo we&#8217;ll be able to find our script like so:\u00a0<code>scripts\/create_message.groovy<\/code>.<\/p>\n<h4><b>Java: Bi-function applying<\/b><\/h4>\n<p>This is fine and good to use too, just that there will be big long constant strings in your code.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-54326 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2021\/12\/Blog4-05-scaled.jpg\" alt=\"Blog image\" width=\"2560\" height=\"1161\" srcset=\"https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-05-scaled.jpg 2560w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-05-300x136.jpg 300w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-05-1024x465.jpg 1024w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-05-768x348.jpg 768w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-05-1536x697.jpg 1536w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-05-2048x929.jpg 2048w, https:\/\/tothenewco.pro\/blog\/wp-content\/uploads\/2021\/12\/Blog4-05-624x283.jpg 624w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>If you haven&#8217;t combined\u00a0Groovy scripts with your Java projects yet, you&#8217;re missing out. It&#8217;s super easy with\u00a0Maven, and it&#8217;ll make your code more modular and elegant. But most importantly, you&#8217;ll have some fun scripting, and if nothing else, you&#8217;ll most certainly benefit from some of the grooviest features, including the magic that is\u00a0Groovy&#8217;s GString! You [&hellip;]<\/p>\n","protected":false},"author":1393,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2,"footnotes":""},"categories":[446,3917,1994,1],"tags":[9,4844],"class_list":["post-54011","post","type-post","status-publish","format-standard","hentry","category-java","category-product-engineering-2","category-software-development","category-technology","tag-groovy","tag-java"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"If you haven&#039;t combined Groovy scripts with your Java projects yet, you&#039;re missing out. It&#039;s super easy with Maven, and it&#039;ll make your code more modular and elegant. But most importantly, you&#039;ll have some fun scripting, and if nothing else, you&#039;ll most certainly benefit from some of the grooviest features, including the magic that is Groovy&#039;s GString! You\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Sumit Navin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Groovying on Template Aid for Java | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"If you haven&#039;t combined Groovy scripts with your Java projects yet, you&#039;re missing out. It&#039;s super easy with Maven, and it&#039;ll make your code more modular and elegant. But most importantly, you&#039;ll have some fun scripting, and if nothing else, you&#039;ll most certainly benefit from some of the grooviest features, including the magic that is Groovy&#039;s GString! You\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Groovying on Template Aid for Java | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"If you haven&#039;t combined Groovy scripts with your Java projects yet, you&#039;re missing out. It&#039;s super easy with Maven, and it&#039;ll make your code more modular and elegant. But most importantly, you&#039;ll have some fun scripting, and if nothing else, you&#039;ll most certainly benefit from some of the grooviest features, including the magic that is Groovy&#039;s GString! You\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/groovying-on-template-aid-for-java\\\/#article\",\"name\":\"Groovying on Template Aid for Java | TO THE NEW Blog\",\"headline\":\"Groovying on Template Aid for Java\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sumit-navin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2021\\\/12\\\/Blog4-01-scaled.jpg\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/groovying-on-template-aid-for-java\\\/#articleImage\"},\"datePublished\":\"2021-12-23T10:19:52+05:30\",\"dateModified\":\"2022-01-13T11:49:34+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/groovying-on-template-aid-for-java\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/groovying-on-template-aid-for-java\\\/#webpage\"},\"articleSection\":\"Java\\\/JVM, Product Engineering, Software development, Technology, Groovy, Java\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/groovying-on-template-aid-for-java\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/groovying-on-template-aid-for-java\\\/#listItem\",\"name\":\"Groovying on Template Aid for Java\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/groovying-on-template-aid-for-java\\\/#listItem\",\"position\":3,\"name\":\"Groovying on Template Aid for Java\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sumit-navin\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sumit-navin\\\/\",\"name\":\"Sumit Navin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/groovying-on-template-aid-for-java\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/67c871bf-792d-46ad-be21-355a798d70fe_Sumit-Navin-Profile-Pitcure.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Sumit Navin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/groovying-on-template-aid-for-java\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/groovying-on-template-aid-for-java\\\/\",\"name\":\"Groovying on Template Aid for Java | TO THE NEW Blog\",\"description\":\"If you haven't combined Groovy scripts with your Java projects yet, you're missing out. It's super easy with Maven, and it'll make your code more modular and elegant. But most importantly, you'll have some fun scripting, and if nothing else, you'll most certainly benefit from some of the grooviest features, including the magic that is Groovy's GString! You\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/groovying-on-template-aid-for-java\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sumit-navin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sumit-navin\\\/#author\"},\"datePublished\":\"2021-12-23T10:19:52+05:30\",\"dateModified\":\"2022-01-13T11:49:34+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Groovying on Template Aid for Java | TO THE NEW Blog","description":"If you haven't combined Groovy scripts with your Java projects yet, you're missing out. It's super easy with Maven, and it'll make your code more modular and elegant. But most importantly, you'll have some fun scripting, and if nothing else, you'll most certainly benefit from some of the grooviest features, including the magic that is Groovy's GString! You","canonical_url":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/#article","name":"Groovying on Template Aid for Java | TO THE NEW Blog","headline":"Groovying on Template Aid for Java","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/sumit-navin\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2021\/12\/Blog4-01-scaled.jpg","@id":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/#articleImage"},"datePublished":"2021-12-23T10:19:52+05:30","dateModified":"2022-01-13T11:49:34+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/#webpage"},"articleSection":"Java\/JVM, Product Engineering, Software development, Technology, Groovy, Java"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewco.pro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/tothenewco.pro\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/#listItem","name":"Groovying on Template Aid for Java"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/#listItem","position":3,"name":"Groovying on Template Aid for Java","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/tothenewco.pro\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewco.pro\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewco.pro\/blog\/author\/sumit-navin\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/sumit-navin\/","name":"Sumit Navin","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/67c871bf-792d-46ad-be21-355a798d70fe_Sumit-Navin-Profile-Pitcure.jpeg","width":96,"height":96,"caption":"Sumit Navin"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/","name":"Groovying on Template Aid for Java | TO THE NEW Blog","description":"If you haven't combined Groovy scripts with your Java projects yet, you're missing out. It's super easy with Maven, and it'll make your code more modular and elegant. But most importantly, you'll have some fun scripting, and if nothing else, you'll most certainly benefit from some of the grooviest features, including the magic that is Groovy's GString! You","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/sumit-navin\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/sumit-navin\/#author"},"datePublished":"2021-12-23T10:19:52+05:30","dateModified":"2022-01-13T11:49:34+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewco.pro\/blog\/#website","url":"https:\/\/tothenewco.pro\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Groovying on Template Aid for Java | TO THE NEW Blog","og:description":"If you haven't combined Groovy scripts with your Java projects yet, you're missing out. It's super easy with Maven, and it'll make your code more modular and elegant. But most importantly, you'll have some fun scripting, and if nothing else, you'll most certainly benefit from some of the grooviest features, including the magic that is Groovy's GString! You","og:url":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/","og:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Groovying on Template Aid for Java | TO THE NEW Blog","twitter:description":"If you haven't combined Groovy scripts with your Java projects yet, you're missing out. It's super easy with Maven, and it'll make your code more modular and elegant. But most importantly, you'll have some fun scripting, and if nothing else, you'll most certainly benefit from some of the grooviest features, including the magic that is Groovy's GString! You","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"54011","title":null,"description":null,"keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":{"id":"#aioseo-article-65e0540649172","slug":"article","graphName":"Article","label":"Article","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"created":"2021-10-05 06:09:06","updated":"2024-02-29 09:53:10","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tGroovying on Template Aid for Java\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"Technology","link":"https:\/\/tothenewco.pro\/blog\/category\/technology\/"},{"label":"Groovying on Template Aid for Java","link":"https:\/\/tothenewco.pro\/blog\/groovying-on-template-aid-for-java\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/54011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/users\/1393"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=54011"}],"version-history":[{"count":7,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/54011\/revisions"}],"predecessor-version":[{"id":54419,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/54011\/revisions\/54419"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=54011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=54011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=54011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}