new configs

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2024-10-15 00:15:13 +02:00
parent d1453e1d90
commit a9eaec521d
5 changed files with 55 additions and 8 deletions

View File

@@ -2,8 +2,10 @@ package dev.mars3142.fhq.config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
@SpringBootApplication
@EnableConfigServer
public class ConfigServiceApplication {
public static void main(String[] args) {

View File

@@ -1,9 +1,3 @@
logging:
level:
com:
netflix:
discovery: off
server:
port: ${PORT:8888}
@@ -15,3 +9,5 @@ spring:
server:
native:
search-locations: classpath:/configurations
profiles:
active: native

View File

@@ -16,7 +16,7 @@ logging:
level:
com:
netflix:
discovery: ERROR
discovery: off
management:
endpoint:

View File

@@ -0,0 +1,50 @@
server:
port: ${PORT:8080}
spring:
cloud:
gateway:
default-filters:
- name: Retry
args:
retries: 3
methods: GET
series: SERVER_ERROR
exceptions: java.io.IOException, java.util.concurrent.TimeoutException
backoff:
firstBackoff: 50ms
maxBackoff: 5000ms
discovery:
locator:
enabled: false
routes:
- id: edge
uri: lb://edge-service
predicates:
- Path=/v3/api-docs/**
filters:
- RewritePath=/v3/api-docs/(?<path>.*), /$\{path}/v3/api-docs
- id: timezone-service
uri: lb://timezone-service
predicates:
- Path=/v1/timezone/**, /health/timezone, /timezone/v3/api-docs
filters:
- RewritePath=/health/timezone, /actuator/health
- RewritePath=/timezone/(?<segment>.*), /$\{segment}
- id: google-service
uri: ${GOOGLE_SERVICE_URI:http://google-service.web:8080}
predicates:
- Path=/v1/account/**, /health/google, /google/v3/api-docs
filters:
- RewritePath=/health/google, /actuator/health
- RewritePath=/google/(?<segment>.*), /$\{segment}
- id: token-service
uri: ${BACKEND_SERVICE_URI:http://backend-service.web:8080}
predicates:
- Path=/v1/token/**, /health/backend, /token/v3/api-docs
filters:
- RewritePath=/health/backend, /actuator/health
- RewritePath=/token/(?<segment>.*), /$\{segment}