- Mastering Spring Cloud
- Piotr Minkowski
- 224字
- 2021-08-27 18:57:04
Advanced configuration settings
Eureka's configuration settings may be divided into three parts:
- Server: It customizes the server behavior. It includes all of the properties with the prefix eureka.server.*. The full list of available fields may be found in the EurekaServerConfigBean class (https://github.com/spring-cloud/spring-cloud-netflix/blob/master/spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfigBean.java).
- Client: It is the first of two available property sections on the Eureka Client's side. It is responsible for the configuration of how the client can query the registry in order to locate other services. It includes all of the properties with the prefix eureka.client.*. For the full list of available fields, you may refer to the EurekaClientConfigBean class (https://github.com/spring-cloud/spring-cloud-netflix/blob/master/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java).
- Instance: It customizes the current instance of the Eureka Client's behavior, such as port or name. It includes all of the properties with the prefix eureka.instance.*. For the full list of available fields, you may refer to the EurekaInstanceConfigBean class (https://github.com/spring-cloud/spring-cloud-netflix/blob/master/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaInstanceConfigBean.java).
I have already shown you how to use some of those properties in order to have the desired effect. I'm going to talk about some interesting scenarios related to configuration settings customization in the next part of this section. It is not needed to describe all of the properties. You may read about them in the comments included in the source code of all of those classes that were listed previously.