{"id":356,"date":"2022-02-26T23:28:59","date_gmt":"2022-02-26T23:28:59","guid":{"rendered":"https:\/\/liangqi.org\/?p=356"},"modified":"2022-02-26T23:37:45","modified_gmt":"2022-02-26T23:37:45","slug":"spring-cloud-bootstrapping-version-2","status":"publish","type":"post","link":"https:\/\/liangqi.org\/?p=356","title":{"rendered":"Spring Cloud &#8211; Bootstrapping Version 2"},"content":{"rendered":"<div class=\"wp-block-jetpack-rating-star\" style=\"text-align:left\" itemprop=\"reviewRating\" itemscope itemtype=\"http:\/\/schema.org\/Rating\"><p><span aria-hidden=\"true\">\u2b50<\/span><span aria-hidden=\"true\">\u2b50<\/span><span aria-hidden=\"true\">\u2b50<\/span><span aria-hidden=\"true\">\u2b50<\/span><span aria-hidden=\"true\">\u2b50<\/span><\/p><span style=\"display: none;\" itemprop=\"worstRating\" content=\"0.5\"><span>\n<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n\t<path class=\"\" fill=\"currentColor\" stroke=\"currentColor\" d=\"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z\" \/>\n<\/svg>\n<\/span>\n<span>\n<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n\t<path class=\"\" fill=\"currentColor\" stroke=\"currentColor\" d=\"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z\" \/>\n<\/svg>\n<\/span><\/span><span style=\"display: none;\" ><span>\n<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n\t<path class=\"\" fill=\"currentColor\" stroke=\"currentColor\" d=\"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z\" \/>\n<\/svg>\n<\/span>\n<span>\n<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n\t<path class=\"\" fill=\"currentColor\" stroke=\"currentColor\" d=\"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z\" \/>\n<\/svg>\n<\/span><\/span><span style=\"display: none;\" ><span>\n<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n\t<path class=\"\" fill=\"currentColor\" stroke=\"currentColor\" d=\"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z\" \/>\n<\/svg>\n<\/span>\n<span>\n<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n\t<path class=\"\" fill=\"currentColor\" stroke=\"currentColor\" d=\"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z\" \/>\n<\/svg>\n<\/span><\/span><span style=\"display: none;\" ><span>\n<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n\t<path class=\"\" fill=\"currentColor\" stroke=\"currentColor\" d=\"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z\" \/>\n<\/svg>\n<\/span>\n<span>\n<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n\t<path class=\"\" fill=\"currentColor\" stroke=\"currentColor\" d=\"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z\" \/>\n<\/svg>\n<\/span><\/span><span style=\"display: none;\" itemprop=\"bestRating\" content=\"5\"><span>\n<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n\t<path class=\"\" fill=\"currentColor\" stroke=\"currentColor\" d=\"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z\" \/>\n<\/svg>\n<\/span>\n<span>\n<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n\t<path class=\"\" fill=\"currentColor\" stroke=\"currentColor\" d=\"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z\" \/>\n<\/svg>\n<\/span><\/span><span itemprop=\"ratingValue\" class=\"screen-reader-text\" content=\"5\">Rating: 5 out of 5.<\/span><\/div>\n\n\n<p>This article is based on <a href=\"https:\/\/www.baeldung.com\/spring-cloud-bootstrapping\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.baeldung.com\/spring-cloud-bootstrapping<\/a>. Which was written on January 21, 2021. Even it&#8217;s only one year ago it&#8217;s a little bit out of dated and there are some errors in the doc.<\/p>\n\n\n\n<p>If you still want to refer to the original doc, here are some corrections you need to do:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>When you setup discovery service, you need to add <code>server.port=8082<\/code> into the <code>application.properties<\/code><\/li><li>Also in discovery service, you need to add following dependency otherwise it would report a exception when you start the service: <strong>No spring.config.import property has been defined<\/strong><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>               &lt;dependency&gt;\n                       &lt;groupId&gt;org.springframework.cloud&lt;\/groupId&gt;\n                       &lt;artifactId&gt;spring-cloud-starter-bootstrap&lt;\/artifactId&gt;\n               &lt;\/dependency&gt;\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>In Gateway service, the plugin <code>zuul<\/code> has been deprecated already, use <code>Spring Cloud Gateway<\/code> instead. (<a href=\"https:\/\/stackoverflow.com\/questions\/65924096\/spring-boot-2-4-2-gateway-api-with-zuul\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/stackoverflow.com\/questions\/65924096\/spring-boot-2-4-2-gateway-api-with-zuul<\/a>)<br><\/li><\/ul>\n\n\n\n<p>TODO: new doc. Though it may not be necessary if you can just remember those errors I mentioned above.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is based on https:\/\/www.baeldung.com\/spring-cloud-bootstrapping. Which was written on January 21, 2021. Even it&#8217;s only one year ago it&#8217;s a little bit out of dated and there are some errors in the doc. If you still want to refer to the original doc, here are some corrections you need to do: When you setup discovery service, you need to add server.port=8082 into the application.properties Also in discovery service, you need to add following dependency otherwise it would report a exception when you start the service: No spring.config.import property has been defined In Gateway service, the plugin zuul has been deprecated already, use Spring Cloud Gateway instead. (https:\/\/stackoverflow.com\/questions\/65924096\/spring-boot-2-4-2-gateway-api-with-zuul) TODO: new doc. Though it may not be necessary if you can just remember those errors I mentioned above.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40,16],"tags":[],"class_list":["post-356","post","type-post","status-publish","format-standard","hentry","category-spring","category-16"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Spring Cloud - Bootstrapping Version 2 - Liangqi\u2018s Technical Journey<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/liangqi.org\/?p=356\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Cloud - Bootstrapping Version 2 - Liangqi\u2018s Technical Journey\" \/>\n<meta property=\"og:description\" content=\"This article is based on https:\/\/www.baeldung.com\/spring-cloud-bootstrapping. Which was written on January 21, 2021. Even it&#8217;s only one year ago it&#8217;s a little bit out of dated and there are some errors in the doc. If you still want to refer to the original doc, here are some corrections you need to do: When you setup discovery service, you need to add server.port=8082 into the application.properties Also in discovery service, you need to add following dependency otherwise it would report a exception when you start the service: No spring.config.import property has been defined In Gateway service, the plugin zuul has been deprecated already, use Spring Cloud Gateway instead. (https:\/\/stackoverflow.com\/questions\/65924096\/spring-boot-2-4-2-gateway-api-with-zuul) TODO: new doc. Though it may not be necessary if you can just remember those errors I mentioned above.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/liangqi.org\/?p=356\" \/>\n<meta property=\"og:site_name\" content=\"Liangqi\u2018s Technical Journey\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-26T23:28:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-26T23:37:45+00:00\" \/>\n<meta name=\"author\" content=\"liangqi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"liangqi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/liangqi.org\/?p=356#article\",\"isPartOf\":{\"@id\":\"https:\/\/liangqi.org\/?p=356\"},\"author\":{\"name\":\"liangqi\",\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"headline\":\"Spring Cloud &#8211; Bootstrapping Version 2\",\"datePublished\":\"2022-02-26T23:28:59+00:00\",\"dateModified\":\"2022-02-26T23:37:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/liangqi.org\/?p=356\"},\"wordCount\":139,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"articleSection\":[\"Spring\",\"\u6280\u672f\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/liangqi.org\/?p=356#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/liangqi.org\/?p=356\",\"url\":\"https:\/\/liangqi.org\/?p=356\",\"name\":\"Spring Cloud - Bootstrapping Version 2 - Liangqi\u2018s Technical Journey\",\"isPartOf\":{\"@id\":\"https:\/\/liangqi.org\/#website\"},\"datePublished\":\"2022-02-26T23:28:59+00:00\",\"dateModified\":\"2022-02-26T23:37:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/liangqi.org\/?p=356#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/liangqi.org\/?p=356\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/liangqi.org\/?p=356#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/liangqi.org\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spring Cloud &#8211; Bootstrapping Version 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/liangqi.org\/#website\",\"url\":\"https:\/\/liangqi.org\/\",\"name\":\"Liangqi\u2018s Technical Journey\",\"description\":\"Chasing Excellence; Enjoy life.\",\"publisher\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/liangqi.org\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\",\"name\":\"liangqi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg\",\"contentUrl\":\"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg\",\"width\":2560,\"height\":1920,\"caption\":\"liangqi\"},\"logo\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/liangqi.org\"],\"url\":\"https:\/\/liangqi.org\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Cloud - Bootstrapping Version 2 - Liangqi\u2018s Technical Journey","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:\/\/liangqi.org\/?p=356","og_locale":"en_US","og_type":"article","og_title":"Spring Cloud - Bootstrapping Version 2 - Liangqi\u2018s Technical Journey","og_description":"This article is based on https:\/\/www.baeldung.com\/spring-cloud-bootstrapping. Which was written on January 21, 2021. Even it&#8217;s only one year ago it&#8217;s a little bit out of dated and there are some errors in the doc. If you still want to refer to the original doc, here are some corrections you need to do: When you setup discovery service, you need to add server.port=8082 into the application.properties Also in discovery service, you need to add following dependency otherwise it would report a exception when you start the service: No spring.config.import property has been defined In Gateway service, the plugin zuul has been deprecated already, use Spring Cloud Gateway instead. (https:\/\/stackoverflow.com\/questions\/65924096\/spring-boot-2-4-2-gateway-api-with-zuul) TODO: new doc. Though it may not be necessary if you can just remember those errors I mentioned above.","og_url":"https:\/\/liangqi.org\/?p=356","og_site_name":"Liangqi\u2018s Technical Journey","article_published_time":"2022-02-26T23:28:59+00:00","article_modified_time":"2022-02-26T23:37:45+00:00","author":"liangqi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"liangqi","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/liangqi.org\/?p=356#article","isPartOf":{"@id":"https:\/\/liangqi.org\/?p=356"},"author":{"name":"liangqi","@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"headline":"Spring Cloud &#8211; Bootstrapping Version 2","datePublished":"2022-02-26T23:28:59+00:00","dateModified":"2022-02-26T23:37:45+00:00","mainEntityOfPage":{"@id":"https:\/\/liangqi.org\/?p=356"},"wordCount":139,"commentCount":0,"publisher":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"articleSection":["Spring","\u6280\u672f"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/liangqi.org\/?p=356#respond"]}]},{"@type":"WebPage","@id":"https:\/\/liangqi.org\/?p=356","url":"https:\/\/liangqi.org\/?p=356","name":"Spring Cloud - Bootstrapping Version 2 - Liangqi\u2018s Technical Journey","isPartOf":{"@id":"https:\/\/liangqi.org\/#website"},"datePublished":"2022-02-26T23:28:59+00:00","dateModified":"2022-02-26T23:37:45+00:00","breadcrumb":{"@id":"https:\/\/liangqi.org\/?p=356#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/liangqi.org\/?p=356"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/liangqi.org\/?p=356#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/liangqi.org\/"},{"@type":"ListItem","position":2,"name":"Spring Cloud &#8211; Bootstrapping Version 2"}]},{"@type":"WebSite","@id":"https:\/\/liangqi.org\/#website","url":"https:\/\/liangqi.org\/","name":"Liangqi\u2018s Technical Journey","description":"Chasing Excellence; Enjoy life.","publisher":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/liangqi.org\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3","name":"liangqi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/liangqi.org\/#\/schema\/person\/image\/","url":"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg","contentUrl":"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg","width":2560,"height":1920,"caption":"liangqi"},"logo":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/liangqi.org"],"url":"https:\/\/liangqi.org\/?author=1"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=356"}],"version-history":[{"count":4,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/356\/revisions"}],"predecessor-version":[{"id":361,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/356\/revisions\/361"}],"wp:attachment":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}