本文共 4835 字,大约阅读时间需要 16 分钟。
##Eureka Client configuration for Eureka Service # Properties based configuration for eureka client that is part of the eureka server. # Similar eureka-client.properties configs can be used for the entire eureka ecosystem (i.e. for both the # eureka servers as well as registering webapps), with minimal changes to application specific properties # (see below for these). #作为eureka服务器一部分的eureka客户端的基于属性的配置。 #类似的eureka-client.properties配置可以用于整个eureka系统(即,对于eureka服务器以及注册webapps), #对应用程序特定属性进行最小的更改(对于这些属性,请参见下文) # # The properties specified here is mostly what the users need to change. # All of these can be specified as a java system property with -D option (eg)-Deureka.region=us-east-1 ## ----------------------------------------------------- ## The below properties are application specific. ## Each new application should set these as appropriate. ## ----------------------------------------------------- # Region where the application is deployed. # - for AWS specify one of the AWS regions # - for other datacenters specify a arbitrary string indicating the region. # This is normally specified as a -D option (eg) -Deureka.region=us-east-1 #部署应用程序的区域 # - 对于AWS指定一个AWS区域 # - 对于其他数据中心,指定一个指示该区域的任意字符串。 # 这里主要指定美国东部D eureka.region=default # Name of the application to be identified by other services (in this case, it is the eureka service itself) #服务指定应用名,这里指的是eureka服务本身 eureka.name=eureka # Virtual host name by which the clients identifies this service (in this case, it is the eureka service itself) #客户识别此服务的虚拟主机名,这里指的是eureka服务本身 eureka.vipAddress=eureka.mydomain.net # The port where the service will be identified and will be serving requests #服务将被识别并将提供请求的端口 eureka.port=8080 # Set to false as this config is for the eureka client in the eureka server itself. # The eureka clients running in eureka server needs to connect to servers in other zones. # # For other applications this should not be set (default to true) for better zone based load balancing. #设置为false,因为该配置适用于eureka服务器本身的eureka客户端。 #在eureka服务器中运行的eureka客户端需要连接到其他区域中的服务器。 #对于其他应用程序,不应设置(默认为true),以实现更好的基于区域的负载平衡。 eureka.preferSameZone=false ## ------------------------------------------------------------------------------ ## The below properties govern how clients should connect to eureka servers. ## In general these can be the same for all clients in the same eureka ecosystem. ##以下属性控制客户端如何连接到eureka服务器。 ## 一般来说,这些对于同一个eureka系统的所有客户来说都是一样的。 ## ------------------------------------------------------------------------------ # Change this if you want to use a DNS based lookup for determining other eureka servers (see example below) #如果要使用基于DNS的查找来确定其他eureka服务器(请参见下面的示例),请更改此选项 eureka.shouldUseDns=false # Since shouldUseDns is false, we use the following properties to explicitly specify the route to the eureka servers #由于shouldUseDns为false,因此我们使用以下属性来明确指定到eureka服务器的路由 eureka.serviceUrl.default=http://localhost:8080/eureka/v2/ # for the eureka server's own client config, set on-demand update to false as it may be too quick for the REST # resource initialization #对于eureka服务器自己的客户端配置,将按需更新设置为false,因为REST资源初始化可能太快了 eureka.shouldOnDemandUpdateStatusChange=false # the default eureka server application context is /eureka/v2 if deployed with eureka.war # Set this property for custom application context. #如果部署了eureka.war,默认的eureka服务器应用程序环境是/eureka/v2 #为自定义应用程序上下文设置此属性。 #eureka.eurekaServer.context=eureka/v2 ## ----------------------- ## AWS deployment examples ## 亚马逊云服务计算平台 部署例子 ##------------------------ # for AWS deployments, availability zones can be specified to take advantage of eureka client zone affinity by # specifying the following configurations. #对于AWS部署,可以指定可用性区域,以通过指定以下配置来利用eureka客户端区域关联。 # for example, if the deployment is in us-east-1 and the available zones are us-east-1a, us-east-1b and us-east-1c, # define the region #eureka.region=us-east-1 # notice that the region is specified as part of the config name #eureka.us-east-1.availabilityZones=us-east-1a,us-east-1b,us-east-1c # "eurekaServerPort" is whatever port your eureka servers are configured with #eureka.serviceUrl.us-east-1a=http://eurekaServerHostName:eurekaServerPort/eureka/v2 #eureka.serviceUrl.us-east-1b=http://eurekaServerHostName:eurekaServerPort/eureka/v2 #eureka.serviceUrl.us-east-1c=http://eurekaServerHostName:eurekaServerPort/eureka/v2 # If shouldUseDns is set to true, the below is an example of how to configure eureka client to route to eureka servers, # assuming for example your DNS records are setup thus: # txt record: txt.mycompany.eureka.mydomain.com => "server1address" "server2address" "server3address" #如果应该将UseDns设置为true,以下是如何配置eureka客户端路由到eureka服务器的示例,假设您的DNS记录设置为: #txt记录: txt.mycompany.eureka.mydomain.com => "server1address" "server2address" "server3address" #eureka.shouldUseDns=true #eureka.eurekaServer.domainName=mydomain.com转载地址:http://lpbni.baihongyu.com/