{"id":76370,"date":"2018-04-27T16:00:42","date_gmt":"2018-04-27T13:00:42","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=76370"},"modified":"2018-04-27T11:32:45","modified_gmt":"2018-04-27T08:32:45","slug":"introduction-to-spring-cloud-config-part-i","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html","title":{"rendered":"Introduction to Spring Cloud &#8211; Config (Part I)"},"content":{"rendered":"<h2>1. Overview<\/h2>\n<p>Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management, service discovery, circuit breakers, intelligent routing, micro-proxy, control bus, one-time tokens, global locks, leadership election, distributed sessions, cluster state).<\/p>\n<p>It helps manage the complexity involved in building the distributed system.<\/p>\n<h2>2. Microservices<\/h2>\n<p>Microservices is a software development architectural style, that decomposes the application into a collection of loosely coupled services.<\/p>\n<p>It improves modularity, thus making the application easier to develop, test &amp; deploy.<\/p>\n<p>It also makes the development process more efficient by parallelizing small teams to work on different services.<\/p>\n<p>There are also various difficulties regarding communication between services, managing configurations, etc in a microservice architecture.<\/p>\n<p>One should go through the <a href=\"https:\/\/12factor.net\/\">Twelve-Factor App Manifesto<\/a> to solve many of the problems arising with a Microservice architecture.<\/p>\n<h2>3. Spring Cloud Config<\/h2>\n<p>Spring Cloud Config provides server and client-side support for externalized configuration in a distributed system.<\/p>\n<p>It has two components, the Config Server &amp; the Config Client.<\/p>\n<p>The Config Server is a central place to manage external properties for applications across all environments. We could also version the configuration files using Git. It exposes REST API\u2019s for clients to connect and get the required configuration. We can also leverage <a href=\"https:\/\/docs.spring.io\/spring-boot\/docs\/current\/reference\/html\/boot-features-profiles.html\">Spring Profiles<\/a> to manage different configuration files for different profiles (environments).<\/p>\n<h2>3. Dependencies<\/h2>\n<p>We\u2019ll use Gradle to build our project. I recommend using <a href=\"http:\/\/start.spring.io\/\">Spring Initializr<\/a> for bootstrapping your project.<\/p>\n<p>We\u2019ll use:<\/p>\n<ul>\n<li>Spring Boot 2<\/li>\n<li>Spring Webflux<\/li>\n<li>Spring Reactive Data MongoDB<\/li>\n<li>Spring Security Reactive Webflux<\/li>\n<li>Lombok<\/li>\n<\/ul>\n<p>Not all the Spring libraries have a stable release yet.<\/p>\n<p>Lombok is used to reduce boilerplate code for models and POJOs. It can generate setters\/getters, default constructors, toString, etc. methods automatically.<\/p>\n<pre class=\"brush:bash\">  \r\nbuildscript {\r\n\text {\r\n\t\tspringBootVersion = '2.0.0.M2'\r\n\t}\r\n...\r\n}\r\n\r\ndependencies {\r\n\tcompile('org.springframework.boot:spring-boot-starter-data-mongodb-reactive')\r\n\tcompile('org.springframework.boot:spring-boot-starter-webflux')\r\n\tcompile('org.springframework.security:spring-security-core')\r\n\tcompile('org.springframework.security:spring-security-config')\r\n\tcompile('org.springframework.security:spring-security-webflux')\r\n\tcompileOnly('org.projectlombok:lombok')\r\n...\r\n}\r\n<\/pre>\n<h2>4. Auto-Configuration<\/h2>\n<p>We\u2019ll leave Spring Boot to automatically configure our application based on the dependencies added.<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:java\">  \r\n@SpringBootApplication\r\n@EnableReactiveMongoRepositories\r\n@EnableWebFluxSecurity\r\npublic class Application {\r\n    public static void main(String[] args) {\r\n        SpringApplication.run(Application.class, args);\r\n    }\r\n}\r\n<\/pre>\n<p>For using non-default values in our application configuration, we can specify them as properties and Spring Boot will automatically use them to create beans.<\/p>\n<pre class=\"brush:bash\">  \r\nspring.data.mongodb.database=demo\r\n<\/pre>\n<p>All beans necessary for MongoDB, Web, and Security will be automatically created.<\/p>\n<h2>5. Database<\/h2>\n<p>We\u2019ll be using MongoDB in our example and a simple POJO. A <code>PersonRepository<\/code> bean will be created automatically.<\/p>\n<pre class=\"brush:java\">  \r\n@Data\r\n@NoArgsConstructor\r\n@Document\r\npublic class Person {\r\n    @Id \r\n    private String id;\r\n    private String name;\r\n}\r\n\r\npublic interface PersonRespository extends ReactiveMongoRepository&lt;Person, String&gt; {\r\n    Flux&lt;Person&gt; findByName(String name);\r\n}\r\n<\/pre>\n<h2>6. Web API<\/h2>\n<p>We\u2019ll create REST endpoints for <code>Person<\/code>.<\/p>\n<p>Spring 5 added support for creating routes functionally while still supporting the traditional annotation-based way of creating them.<\/p>\n<p>Let\u2019s look at both of them with the help of examples.<\/p>\n<h3>6.1. Annotation-based<\/h3>\n<p>This is the traditional way of creating endpoints.<\/p>\n<pre class=\"brush:java\">  \r\n@RestController\r\n@RequestMapping(\"\/person\")\r\npublic class PersonController {\r\n\r\n    @Autowired\r\n    private PersonRespository personRespository;\r\n\r\n    @GetMapping\r\n    public Flux&lt;Person&gt; index() {\r\n        return personRespository.findAll();\r\n    }\r\n}\r\n<\/pre>\n<p>This will create a REST endpoint <strong>\/person<\/strong> which will return all the <code>Person<\/code> records reactively.<\/p>\n<h3>6.2. Router Functions<\/h3>\n<p>This is a new and concise way of creating endpoints.<\/p>\n<pre class=\"brush:java\">  \r\n@Bean\r\nRouterFunction&lt;?&gt; routes(PersonRespository personRespository) {\r\n    return nest(path(\"\/person\"),\r\n\r\n            route(RequestPredicates.GET(\"\/{id}\"),\r\n                request -&gt; ok().body(personRespository.findById(request.pathVariable(\"id\")), Person.class))\r\n\r\n            .andRoute(method(HttpMethod.POST),\r\n                request -&gt; {\r\n                    personRespository.insert(request.bodyToMono(Person.class)).subscribe();\r\n                    return ok().build();\r\n        })\r\n    );\r\n}\r\n<\/pre>\n<p>The <code>nest<\/code> method is used to create nested routes, where a group of routes share a common path (prefix), header, or other <code>RequestPredicate<\/code>.<\/p>\n<p>So, in our case all the corresponding routes have the common prefix <strong>\/person<\/strong>.<\/p>\n<p>In the first route, we have exposed a GET API <strong>\/person\/{id}<\/strong> which will retrieve the corresponding record and return it.<\/p>\n<p>In the second route, we have exposed a POST API <strong>\/person<\/strong> which will receive a Person object and save it in the DB.<\/p>\n<p>The cURL commands for the same:<\/p>\n<pre class=\"brush:bash\">  \r\ncurl http:\/\/localhost:8080\/person -v -u tom:password\r\ncurl http:\/\/localhost:8080\/person\/{id} -v -u tom:password\r\ncurl http:\/\/localhost:8080\/person -X POST -d '{\"name\":\"John Doe\",\"age\":20}' -H \"Content-Type: application\/json\" -v -u tom:password\r\n<\/pre>\n<p>We should define the routes in a Spring configuration file.<\/p>\n<h2>7. Security<\/h2>\n<p>We\u2019ll be using a very simple basic authentication mechanism in our example.<\/p>\n<pre class=\"brush:java\">  \r\n@Bean\r\nUserDetailsRepository userDetailsRepository() {\r\n    UserDetails tom = withUsername(\"tom\").password(\"password\").roles(\"USER\").build();\r\n    UserDetails harry = withUsername(\"harry\").password(\"password\").roles(\"USER\", \"ADMIN\").build();\r\n    return new MapUserDetailsRepository(tom, harry);\r\n}\r\n<\/pre>\n<p>We have added some users for our application and assigned different roles to them.<\/p>\n<h2>8. Conclusion<\/h2>\n<p>I have tried explaining, with a simple example, how to build a simple Reactive web application using Spring Boot.<\/p>\n<p>You can read more about:<\/p>\n<ul>\n<li><a href=\"https:\/\/projects.spring.io\/spring-cloud\/spring-cloud.html\">Spring Cloud<\/a><\/li>\n<li><a href=\"https:\/\/spring.io\/blog\/2016\/11\/28\/going-reactive-with-spring-data\">Spring Data Reactive<\/a><\/li>\n<li><a href=\"https:\/\/spring.io\/blog\/2016\/09\/22\/new-in-spring-5-functional-web-framework\">Spring Functional Web Framework<\/a><\/li>\n<\/ul>\n<p>You can find the complete example for the <a href=\"https:\/\/github.com\/mohitsinha\/tutorials\/tree\/master\/config-server\">Config Server<\/a> &amp; <a href=\"https:\/\/github.com\/mohitsinha\/tutorials\/tree\/master\/library-service\">Library Service<\/a> on Github.<\/p>\n<div class=\"attribution\">\n<table>\n<tr>\n<td>\n<p>Published on Java Code Geeks with permission by Mohit Sinha, partner at our <a target=\"_blank\" href=\"\/\/www.javacodegeeks.com\/join-us\/jcg\/\">JCG program<\/a>. See the original article here: <a target=\"_blank\" href=\"http:\/\/sinhamohit.com\/\/writing\/spring-cloud-part1-config\">Introduction to Spring Cloud &#8211; Config (Part I)<\/a><\/p>\n<p>Opinions expressed by Java Code Geeks contributors are their own.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. Overview Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management, service discovery, circuit breakers, intelligent routing, micro-proxy, control bus, one-time tokens, global locks, leadership election, distributed sessions, cluster state). It helps manage the complexity involved in building the distributed system. 2. Microservices Microservices &hellip;<\/p>\n","protected":false},"author":8695,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[960,992],"class_list":["post-76370","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-microservices","tag-spring-cloud"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Introduction to Spring Cloud - Config (Part I) - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"1. Overview Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management,\" \/>\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\/2018\/04\/introduction-to-spring-cloud-config-part-i.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction to Spring Cloud - Config (Part I) - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"1. Overview Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.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=\"2018-04-27T13:00:42+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=\"Mohit sinha\" \/>\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=\"Mohit sinha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.html\"},\"author\":{\"name\":\"Mohit sinha\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/ff8221b0c25d3b4386e4815719dddabf\"},\"headline\":\"Introduction to Spring Cloud &#8211; Config (Part I)\",\"datePublished\":\"2018-04-27T13:00:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.html\"},\"wordCount\":645,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"Microservices\",\"Spring Cloud\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.html\",\"name\":\"Introduction to Spring Cloud - Config (Part I) - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2018-04-27T13:00:42+00:00\",\"description\":\"1. Overview Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management,\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.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\\\/2018\\\/04\\\/introduction-to-spring-cloud-config-part-i.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\":\"Introduction to Spring Cloud &#8211; Config (Part I)\"}]},{\"@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\\\/ff8221b0c25d3b4386e4815719dddabf\",\"name\":\"Mohit sinha\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed20d687041a002ed3ade1b9be16d1f03943f1a93750d0ded7df6e00edb27465?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed20d687041a002ed3ade1b9be16d1f03943f1a93750d0ded7df6e00edb27465?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed20d687041a002ed3ade1b9be16d1f03943f1a93750d0ded7df6e00edb27465?s=96&d=mm&r=g\",\"caption\":\"Mohit sinha\"},\"description\":\"Mohit Sinha is a Software Developer at Turtlemint, where he focuses mostly on the back-end. Prior to that he has worked on different types of projects which enhanced his skill-set in different ways. He enjoys writing about things he learns. He constantly searches for ways to create better software &amp; applications.\",\"sameAs\":[\"http:\\\/\\\/sinhamohit.com\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sinhamohit\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/mohit-sinha\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Introduction to Spring Cloud - Config (Part I) - Java Code Geeks","description":"1. Overview Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management,","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\/2018\/04\/introduction-to-spring-cloud-config-part-i.html","og_locale":"en_US","og_type":"article","og_title":"Introduction to Spring Cloud - Config (Part I) - Java Code Geeks","og_description":"1. Overview Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management,","og_url":"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2018-04-27T13:00:42+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":"Mohit sinha","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Mohit sinha","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html"},"author":{"name":"Mohit sinha","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/ff8221b0c25d3b4386e4815719dddabf"},"headline":"Introduction to Spring Cloud &#8211; Config (Part I)","datePublished":"2018-04-27T13:00:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html"},"wordCount":645,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["Microservices","Spring Cloud"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html","url":"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html","name":"Introduction to Spring Cloud - Config (Part I) - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2018-04-27T13:00:42+00:00","description":"1. Overview Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management,","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2018\/04\/introduction-to-spring-cloud-config-part-i.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\/2018\/04\/introduction-to-spring-cloud-config-part-i.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":"Introduction to Spring Cloud &#8211; Config (Part I)"}]},{"@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\/ff8221b0c25d3b4386e4815719dddabf","name":"Mohit sinha","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ed20d687041a002ed3ade1b9be16d1f03943f1a93750d0ded7df6e00edb27465?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ed20d687041a002ed3ade1b9be16d1f03943f1a93750d0ded7df6e00edb27465?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed20d687041a002ed3ade1b9be16d1f03943f1a93750d0ded7df6e00edb27465?s=96&d=mm&r=g","caption":"Mohit sinha"},"description":"Mohit Sinha is a Software Developer at Turtlemint, where he focuses mostly on the back-end. Prior to that he has worked on different types of projects which enhanced his skill-set in different ways. He enjoys writing about things he learns. He constantly searches for ways to create better software &amp; applications.","sameAs":["http:\/\/sinhamohit.com\/","https:\/\/www.linkedin.com\/in\/sinhamohit\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/mohit-sinha"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/76370","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\/8695"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=76370"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/76370\/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=76370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=76370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=76370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}