Spring,  技术

Spring Cloud – Bootstrapping Version 2

Rating: 5 out of 5.

This article is based on https://www.baeldung.com/spring-cloud-bootstrapping. Which was written on January 21, 2021. Even it’s only one year ago it’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
               <dependency>
                       <groupId>org.springframework.cloud</groupId>
                       <artifactId>spring-cloud-starter-bootstrap</artifactId>
               </dependency>

TODO: new doc. Though it may not be necessary if you can just remember those errors I mentioned above.

Leave a Reply

Your email address will not be published. Required fields are marked *