{"id":22,"date":"2008-06-03T15:57:01","date_gmt":"2008-09-12T14:39:18","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=22"},"modified":"2015-07-10T13:17:40","modified_gmt":"2015-07-10T07:47:40","slug":"how-to-make-bootstraping-environment-specific-in-a-grails-app","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/","title":{"rendered":"How to make Bootstraping environment specific in a Grails app?"},"content":{"rendered":"<p><strong>BootStraping<\/strong> is something which is needed in <a title=\"Grails Development\" href=\"https:\/\/tothenewco.pro\/grails-application-development\">most of the grails application<\/a>. One of the frequently asked questions (and a valid requirement as well) is : How do you make Bootstraping happen only in a particular environment.<\/p>\n<p>This can be done by making use of one of the Grails utility class which allows you to inspect the environment in which the code is executing.<\/p>\n<p>Example:<\/p>\n<p>if (GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) {<\/p>\n<p>\/\/ Your bootstraping code here.<\/p>\n<p>}<\/p>\n<p>Don&#8217;t forget to import the following two classes:<\/p>\n<p>org.codehaus.groovy.grails.commons.GrailsApplication<br \/>\ngrails.util.GrailsUtil<\/p>\n<p>Hope this little tips saves you some time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BootStraping is something which is needed in most of the grails application. One of the frequently asked questions (and a valid requirement as well) is : How do you make Bootstraping happen only in a particular environment. This can be done by making use of one of the Grails utility class which allows you to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":4,"footnotes":""},"categories":[7],"tags":[4840,9],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-grails","tag-grails","tag-groovy"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"BootStraping is something which is needed in most of the grails application. One of the frequently asked questions (and a valid requirement as well) is : How do you make Bootstraping happen only in a particular environment. This can be done by making use of one of the Grails utility class which allows you to\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Deepak\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/\" \/>\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=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to make Bootstraping environment specific in a Grails app? | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"BootStraping is something which is needed in most of the grails application. One of the frequently asked questions (and a valid requirement as well) is : How do you make Bootstraping happen only in a particular environment. This can be done by making use of one of the Grails utility class which allows you to\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/\" \/>\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 property=\"article:tag\" content=\"grails\" \/>\n\t\t<meta property=\"article:tag\" content=\"groovy\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2008-09-12T14:39:18+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2015-07-10T07:47:40+00:00\" \/>\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=\"How to make Bootstraping environment specific in a Grails app? | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"BootStraping is something which is needed in most of the grails application. One of the frequently asked questions (and a valid requirement as well) is : How do you make Bootstraping happen only in a particular environment. This can be done by making use of one of the Grails utility class which allows you to\" \/>\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\\\/how-to-make-bootstraping-environment-specific-in-a-grails-app\\\/#article\",\"name\":\"How to make Bootstraping environment specific in a Grails app? | TO THE NEW Blog\",\"headline\":\"How to make Bootstraping environment specific in a Grails app?\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2008-06-03T15:57:01+05:30\",\"dateModified\":\"2015-07-10T13:17:40+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-make-bootstraping-environment-specific-in-a-grails-app\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-make-bootstraping-environment-specific-in-a-grails-app\\\/#webpage\"},\"articleSection\":\"Grails, Grails, Groovy\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-make-bootstraping-environment-specific-in-a-grails-app\\\/#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\\\/grails\\\/#listItem\",\"name\":\"Grails\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"position\":2,\"name\":\"Grails\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-make-bootstraping-environment-specific-in-a-grails-app\\\/#listItem\",\"name\":\"How to make Bootstraping environment specific in a Grails app?\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-make-bootstraping-environment-specific-in-a-grails-app\\\/#listItem\",\"position\":3,\"name\":\"How to make Bootstraping environment specific in a Grails app?\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}}]},{\"@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\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Deepak\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-make-bootstraping-environment-specific-in-a-grails-app\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0707e9f5d93472c1d7bc0afaf21c81e0d6df62135f7e1426eb9e78bdd944f149?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Deepak\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-make-bootstraping-environment-specific-in-a-grails-app\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-make-bootstraping-environment-specific-in-a-grails-app\\\/\",\"name\":\"How to make Bootstraping environment specific in a Grails app? | TO THE NEW Blog\",\"description\":\"BootStraping is something which is needed in most of the grails application. One of the frequently asked questions (and a valid requirement as well) is : How do you make Bootstraping happen only in a particular environment. This can be done by making use of one of the Grails utility class which allows you to\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-make-bootstraping-environment-specific-in-a-grails-app\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2008-06-03T15:57:01+05:30\",\"dateModified\":\"2015-07-10T13:17:40+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":"How to make Bootstraping environment specific in a Grails app? | TO THE NEW Blog","description":"BootStraping is something which is needed in most of the grails application. One of the frequently asked questions (and a valid requirement as well) is : How do you make Bootstraping happen only in a particular environment. This can be done by making use of one of the Grails utility class which allows you to","canonical_url":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/#article","name":"How to make Bootstraping environment specific in a Grails app? | TO THE NEW Blog","headline":"How to make Bootstraping environment specific in a Grails app?","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"datePublished":"2008-06-03T15:57:01+05:30","dateModified":"2015-07-10T13:17:40+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/#webpage"},"articleSection":"Grails, Grails, Groovy"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/#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\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/tothenewco.pro\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/#listItem","name":"How to make Bootstraping environment specific in a Grails app?"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/#listItem","position":3,"name":"How to make Bootstraping environment specific in a Grails app?","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@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\/admin\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/admin\/","name":"Deepak","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/0707e9f5d93472c1d7bc0afaf21c81e0d6df62135f7e1426eb9e78bdd944f149?s=96&d=mm&r=g","width":96,"height":96,"caption":"Deepak"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/","name":"How to make Bootstraping environment specific in a Grails app? | TO THE NEW Blog","description":"BootStraping is something which is needed in most of the grails application. One of the frequently asked questions (and a valid requirement as well) is : How do you make Bootstraping happen only in a particular environment. This can be done by making use of one of the Grails utility class which allows you to","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/admin\/#author"},"datePublished":"2008-06-03T15:57:01+05:30","dateModified":"2015-07-10T13:17:40+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":"article","og:title":"How to make Bootstraping environment specific in a Grails app? | TO THE NEW Blog","og:description":"BootStraping is something which is needed in most of the grails application. One of the frequently asked questions (and a valid requirement as well) is : How do you make Bootstraping happen only in a particular environment. This can be done by making use of one of the Grails utility class which allows you to","og:url":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/","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","article:tag":{"0":"grails","2":"groovy"},"article:published_time":"2008-09-12T14:39:18+00:00","article:modified_time":"2015-07-10T07:47:40+00:00","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"How to make Bootstraping environment specific in a Grails app? | TO THE NEW Blog","twitter:description":"BootStraping is something which is needed in most of the grails application. One of the frequently asked questions (and a valid requirement as well) is : How do you make Bootstraping happen only in a particular environment. This can be done by making use of one of the Grails utility class which allows you to","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"22","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"article","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":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","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":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"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":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 08:17:00","updated":"2024-02-29 11:01:21","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\/grails\/\" title=\"Grails\">Grails<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to make Bootstraping environment specific in a Grails app?\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"Grails","link":"https:\/\/tothenewco.pro\/blog\/category\/grails\/"},{"label":"How to make Bootstraping environment specific in a Grails app?","link":"https:\/\/tothenewco.pro\/blog\/how-to-make-bootstraping-environment-specific-in-a-grails-app\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/22","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":0,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}