springcloud distributed configuration center

This article is to do some application of the content of http://blog.didispace.com/springcloud4/

1.bootstrap.properties file content

#Because the related configuration of config will precede application.properties,
#And the loading of bootstrap.properties should also precede application.properties
#The following properties must be placed in bootstrap.properties, and application.properties cannot have

#Must be the same as the file prefix in the configuration center
#spring.application.name=back-service
#server.port=2222
#eureka.client.serviceUrl.defaultZone=http://localhost:1111/eureka/
#spring.cloud.config.discovery.enabled=true
#spring.cloud.config.discovery.serviceId=config-server
#spring.cloud.config.profile=dev

2.application-dev.properties file content

# Enable health check (requires spring-boot-starter-actuator dependency)
eureka.client.healthcheck.enabled=true
# Renewal update interval (default 30 seconds)
eureka.instance.lease-renewal-interval-in-seconds=30
# Renewal expiration time (default 90 seconds)
eureka.instance.lease-expiration-duration-in-seconds=10

3. Configuration center service

  

 It can be seen that many services can be configured, and the service name must correspond to the configuration file prefix

  

 

 

 

 

 

 

 

 

 

1

1

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326502657&siteId=291194637