I am creating spring-boot Eureka server
and client micro-services to deploy on aws. I have read on tutorials that I have to define eureka.datacenter: cloud
in my application.yml
of eureka server so that it knows it is on aws. But when I try to use it in my application.yml file I get unknown property 'eureka.datacenter'
.
Dependencies I have included for eureka server.
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
</dependencies>
I am using Spring boot 1.5.8.RELEASE
and spring cloud Edgware.SR1
.
Is eureka.datacenter property included in different version of spring cloud?
application.yml
spring:
application:
name: eureka-svc
---
spring:
profiles: localhost
server:
port: 8761
eureka:
instance:
hostname: localhost
client:
fetchRegistry: false
register-with-eureka: false
serviceUrl:
defaultZone: http://localhost:8761/eureka
---
spring:
profiles: aws
server:
port: 8761
eureka:
instance:
non-secure-port: ${server.port}
environment: production
client:
region: region
register-with-eureka: true
fetchRegistry: true
use-dns-for-fetching-service-urls: true
eureka-server-d-n-s-name: dns-name
eureka-server-port: 8761
eureka-server-u-r-l-context: eureka
server:
a-w-s-access-id: access-id
a-w-s-secret-key: aws-key
binding-strategy: route53
list-auto-scaling-groups-role-name: role-name