{"id":113427,"date":"2022-04-05T07:00:00","date_gmt":"2022-04-05T04:00:00","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=113427"},"modified":"2022-04-01T17:34:19","modified_gmt":"2022-04-01T14:34:19","slug":"handling-configurations-in-spring-boot","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html","title":{"rendered":"HANDLING CONFIGURATIONS IN SPRING BOOT"},"content":{"rendered":"<p>I am currently getting back to coding in Java + Spring after about 8 years. In the last 8 years, the time I spent on coding has gone significantly as I am now into leadership roles that take me away from writing code. Having said that, I need to understand some level of coding, especially in the Java world, as that\u2019s the language in which I find most of my projects, and I cannot help my teams effectively unless I am familiar with coding. So much has changed since I stopped coding, and I am learning everything again. This is the first of the many articles I will write to get as I know new things. Also, I am building an application more from my personal fruition. I generally cannot spend consistent time, which allows me to spend more time learning instead of trying to meet the deadlines of an actual life client project.<\/p>\n<p>In this post, I will talk about how to use externalize configurations in a Spring Boot application.<\/p>\n<h2 class=\"wp-block-heading\">1. Overview<\/h2>\n<p>We will use Spring Boot\u2019s default setup to create some configurations and read them in our application. We will also look at a simple key-value way of setting up properties and YAML based configurations.<\/p>\n<p>I prefer using YAML and from this point onwards I will only be using YAML bases setups.<\/p>\n<h2 class=\"wp-block-heading\">2. Initial Setup<\/h2>\n<p>During my implementation run, I noticed that I was eventually required to use the spring-boot-configuration-processor dependency. Else I would get an error, and the code would not compile. I didn\u2019t find much on why this is needed in my research, but adding this dependency resolved the issue for me.<\/p>\n<p>The second dependency I have added is for Actuator, which gives us some exciting tools. This is unnecessary, but if you are looking to debug your properties and find more configurations to work with, I will suggest you add this as well.<\/p>\n<pre class=\"brush:xml\">&lt;dependency&gt;\n            &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n            &lt;artifactId&gt;spring-boot-configuration-processor&lt;\/artifactId&gt;\n            &lt;optional&gt;true&lt;\/optional&gt;\n        &lt;\/dependency&gt;\n        &lt;dependency&gt;\n            &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n            &lt;artifactId&gt;spring-boot-starter-actuator&lt;\/artifactId&gt;\n        &lt;\/dependency&gt;<\/pre>\n<h2 class=\"wp-block-heading\">3. Setting up Configuration Files<\/h2>\n<p>The following code is for application.properties file which is the default format you will get in Spring Boot.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush:bash\"># This is to expose all the endpoints for Actuator. use * for all ONLY in DEV\nmanagement.endpoints.web.exposure.include=*\n\n# Custom Properties\nbungie.rootPath=\"https:\/\/www.bungie.net\/Platform\"\nbungie.apiKey=000999888111<\/pre>\n<p>The following is same properties for in YAML format.<\/p>\n<pre class=\"brush:bash\">bungie:\n  rootPath: \"https:\/\/www.bungie.net\/Platform\"\n  apiKey: 000999888111<\/pre>\n<h2 class=\"wp-block-heading\">4. Creating the Bean that will read these configurations<\/h2>\n<p>Now that we have created the properties, we have 2 use cases that we need to consider when reading the properties.<\/p>\n<ul class=\"wp-block-list\">\n<li><strong>Reading One off property<\/strong> \u2013 In this case, we may need to create a property that needs to be read once or can\u2019t be categorised with any other property. In this case, you can use the @Value annotation to read it.<\/li>\n<li><strong>Reading a set of properties<\/strong> \u2013 In our example, we have already identified two grouped properties under the \u201cbungie\u201d category. This is how I prefer to create properties. I do not like having orphan properties, and hence we will only see how to set these up. The following example will show us creating a Java Bean\/Configuration, which will be able to read our property file and populate the object.<\/li>\n<\/ul>\n<pre class=\"brush:java\">package io.howtoarchitect.destinyclanwars.config;\n\nimport lombok.Getter;\nimport lombok.Setter;\nimport org.springframework.boot.context.properties.ConfigurationProperties;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\n@ConfigurationProperties(\"bungie\")\n@Getter @Setter\npublic class BungieClientSettings {\n    private String rootPath;\n    private String apiKey;\n}<\/pre>\n<p>If you observe the code block above, you will notice a few things:<\/p>\n<ul class=\"wp-block-list\">\n<li>We have used <code>@Configuration<\/code> to let the Spring application know that this is a bean and should be initialised as such<\/li>\n<li><code>@Getter<\/code> and <code>@Setter<\/code> are from the Lombok package, giving us default Getters and Setters. These are mandatory as Spring application will always need these getters and setters.<\/li>\n<li><code>@ConfigurationProperties<\/code> is the annotation that does the main trick here. It will go through all the properties available in our context and will search for any that have been mapped user \u201cbungie\u201d. Once found, this annotation will map the YAML\/Properties file values and add them to our strings.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\">5. Consuming Properties<\/h2>\n<p>Once you have this setup, the last step is to read these properties in our application. We will be reading these properties in another Spring bean\/service.<\/p>\n<pre class=\"brush:java\">package io.howtoarchitect.destinyclanwars.bungieclient;\n\nimport io.howtoarchitect.destinyclanwars.config.BungieClientSettings;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.http.HttpHeaders;\nimport org.springframework.http.MediaType;\nimport org.springframework.stereotype.Service;\nimport org.springframework.web.reactive.function.client.WebClient;\n\n@Service\npublic class BungieClient {\n    private static WebClient client;\n\n    @Autowired\n    private BungieClientSettings bungieClientSettings;\n\n    public WebClient getDefaultClient() {\n        client = WebClient.builder()\n                .baseUrl(bungieClientSettings.getRootPath())\n                .defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)\n                .defaultHeader(\"X-API-KEY\", bungieClientSettings.getApiKey())\n                .build();\n\n        return client;\n    }\n}<\/pre>\n<p>You will notice that I have added <code>BungieClientSettings<\/code> as an <code>@Autowired<\/code> dependency. This injects the bean in my class, and when I need to access these properties, all I need to do is <code>bungieClientSettings.getAPIKey()<\/code> and <code>bungieClientSettings.getRootPath()<\/code>.<\/p>\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n<p>This is all you need to do is to externalise your properties. This is important to set up early on because if you do not, you will end up having many of these scattered in classes, and moving across to multiple environments will become hard.<\/p>\n<p>In next few articles, we will look at<\/p>\n<ol class=\"wp-block-list\">\n<li>How to use environment-based configuration. In my case, I will have different keys for development and production, and I will be able to handle the same.<\/li>\n<li>Use Spring\u2019s cloud configuration Server, which will allow us to centralise our configurations into 1 project and also be able to swap designs without having to deploy the code (Configuration as Code pattern).<\/li>\n<li>Finally, we will look at how can we secure some of these properties via encryption. For example, my <code>apiKeys<\/code> need to be confirmed. I have used random values in the samples that I have given, but in my application, I need keys to be valid and not exposed via GITHUB repo plain text files.<\/li>\n<\/ol>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>Published on Java Code Geeks with permission by Kapil Viren Ahuja, partner at our <a href=\"\/\/www.javacodegeeks.com\/join-us\/jcg\/\" target=\"_blank\" rel=\"noopener\">JCG program<\/a>. See the original article here: <a href=\"https:\/\/scratchpad101.com\/2022\/03\/27\/handling-configurations-in-spring-boot\/\" target=\"_blank\" rel=\"noopener\">HANDLING CONFIGURATIONS IN SPRING BOOT<\/a><\/p>\n<p>Opinions expressed by Java Code Geeks contributors are their own.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I am currently getting back to coding in Java + Spring after about 8 years. In the last 8 years, the time I spent on coding has gone significantly as I am now into leadership roles that take me away from writing code. Having said that, I need to understand some level of coding, especially &hellip;<\/p>\n","protected":false},"author":131,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-113427","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HANDLING CONFIGURATIONS IN SPRING BOOT - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn about sprng boot? Check our article explaining how to handle configurations in spring boot.\" \/>\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\/2022\/04\/handling-configurations-in-spring-boot.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HANDLING CONFIGURATIONS IN SPRING BOOT - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about sprng boot? Check our article explaining how to handle configurations in spring boot.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.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=\"2022-04-05T04:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-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=\"Kapil Viren Ahuja\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/kapilthemonk\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kapil Viren Ahuja\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.html\"},\"author\":{\"name\":\"Kapil Viren Ahuja\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/f9f943f056d9d395b5f1aa6f0fa9b4d2\"},\"headline\":\"HANDLING CONFIGURATIONS IN SPRING BOOT\",\"datePublished\":\"2022-04-05T04:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.html\"},\"wordCount\":860,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.html\",\"name\":\"HANDLING CONFIGURATIONS IN SPRING BOOT - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2022-04-05T04:00:00+00:00\",\"description\":\"Interested to learn about sprng boot? Check our article explaining how to handle configurations in spring boot.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2022\\\/04\\\/handling-configurations-in-spring-boot.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\":\"HANDLING CONFIGURATIONS IN SPRING BOOT\"}]},{\"@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\\\/f9f943f056d9d395b5f1aa6f0fa9b4d2\",\"name\":\"Kapil Viren Ahuja\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9bbb07e44c11e029b4278ce04c3a46205eb43bfdb12a06f3e415402ea3ecdc9e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9bbb07e44c11e029b4278ce04c3a46205eb43bfdb12a06f3e415402ea3ecdc9e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9bbb07e44c11e029b4278ce04c3a46205eb43bfdb12a06f3e415402ea3ecdc9e?s=96&d=mm&r=g\",\"caption\":\"Kapil Viren Ahuja\"},\"description\":\"Kapil Viren Ahuja is a Senior Manager, Technology from SapientNitro\u2019s Gurgaon Office. Kapil is the solution architect working on Digital Marketing Platforms and has worked for accounts including NASCAR, Richemont, Alex and Ani. Kapil has also been the Lead Architect on the SapientNitro\u2019s EngagedNow platform. In his role Kapil is responsible for driving technical solutions and delivery on various projects. Kapil over the course of his 15 years of total experience has worked on several technologies spanning from Enterprise technical stacks to CMS to Experience technologies. Kapil is also an evangelist of new technologies and loves to go beyond the same old day to day work and find new and innovative ways to do the same things more effectively.\",\"sameAs\":[\"http:\\\/\\\/scratchpad101.com\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/kvahuja\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/kapilthemonk\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Kapil-Viren-Ahuja\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HANDLING CONFIGURATIONS IN SPRING BOOT - Java Code Geeks","description":"Interested to learn about sprng boot? Check our article explaining how to handle configurations in 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.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html","og_locale":"en_US","og_type":"article","og_title":"HANDLING CONFIGURATIONS IN SPRING BOOT - Java Code Geeks","og_description":"Interested to learn about sprng boot? Check our article explaining how to handle configurations in spring boot.","og_url":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2022-04-05T04:00:00+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Kapil Viren Ahuja","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/kapilthemonk","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Kapil Viren Ahuja","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html"},"author":{"name":"Kapil Viren Ahuja","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/f9f943f056d9d395b5f1aa6f0fa9b4d2"},"headline":"HANDLING CONFIGURATIONS IN SPRING BOOT","datePublished":"2022-04-05T04:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html"},"wordCount":860,"commentCount":2,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html","url":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html","name":"HANDLING CONFIGURATIONS IN SPRING BOOT - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2022-04-05T04:00:00+00:00","description":"Interested to learn about sprng boot? Check our article explaining how to handle configurations in spring boot.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2022\/04\/handling-configurations-in-spring-boot.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":"HANDLING CONFIGURATIONS IN SPRING BOOT"}]},{"@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\/f9f943f056d9d395b5f1aa6f0fa9b4d2","name":"Kapil Viren Ahuja","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9bbb07e44c11e029b4278ce04c3a46205eb43bfdb12a06f3e415402ea3ecdc9e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9bbb07e44c11e029b4278ce04c3a46205eb43bfdb12a06f3e415402ea3ecdc9e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9bbb07e44c11e029b4278ce04c3a46205eb43bfdb12a06f3e415402ea3ecdc9e?s=96&d=mm&r=g","caption":"Kapil Viren Ahuja"},"description":"Kapil Viren Ahuja is a Senior Manager, Technology from SapientNitro\u2019s Gurgaon Office. Kapil is the solution architect working on Digital Marketing Platforms and has worked for accounts including NASCAR, Richemont, Alex and Ani. Kapil has also been the Lead Architect on the SapientNitro\u2019s EngagedNow platform. In his role Kapil is responsible for driving technical solutions and delivery on various projects. Kapil over the course of his 15 years of total experience has worked on several technologies spanning from Enterprise technical stacks to CMS to Experience technologies. Kapil is also an evangelist of new technologies and loves to go beyond the same old day to day work and find new and innovative ways to do the same things more effectively.","sameAs":["http:\/\/scratchpad101.com\/","https:\/\/www.linkedin.com\/in\/kvahuja","https:\/\/x.com\/http:\/\/twitter.com\/kapilthemonk"],"url":"https:\/\/www.javacodegeeks.com\/author\/Kapil-Viren-Ahuja"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/113427","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\/131"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=113427"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/113427\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=113427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=113427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=113427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}