usage of eureka

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2024-09-30 22:48:56 +02:00
parent 3e8c699f61
commit 3cdfc2d4b9
2 changed files with 13 additions and 1 deletions

View File

@@ -41,6 +41,7 @@ dependencies {
implementation 'io.grpc:grpc-netty' implementation 'io.grpc:grpc-netty'
implementation 'io.netty:netty-all' implementation 'io.netty:netty-all'
implementation 'com.nimbusds:nimbus-jose-jwt:9.41.1' implementation 'com.nimbusds:nimbus-jose-jwt:9.41.1'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
testImplementation 'io.projectreactor:reactor-test' testImplementation 'io.projectreactor:reactor-test'
compileOnly 'org.projectlombok:lombok' compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools' developmentOnly 'org.springframework.boot:spring-boot-devtools'

View File

@@ -1,3 +1,7 @@
eureka:
instance:
instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}}
info: info:
application: application:
name: ${spring.application.name} name: ${spring.application.name}
@@ -37,8 +41,15 @@ spring:
firstBackoff: 50ms firstBackoff: 50ms
maxBackoff: 5000ms maxBackoff: 5000ms
routes: routes:
- id: eureka-service
uri: lb://eureka-service
predicates:
- Path=/discovery/**
filters:
- StripPrefix=1
- id: timezone-service - id: timezone-service
uri: ${TIMEZONE_SERVICE_URI:http://timezone-service.web:8080} uri: lb://timezone-service
predicates: predicates:
- Path=/v1/timezone/**, /health/timezone - Path=/v1/timezone/**, /health/timezone
filters: filters: