From 36500e35ef336426eb284c8709130f1257920527 Mon Sep 17 00:00:00 2001 From: Michael Baumberger Date: Fri, 15 Dec 2023 13:19:46 +0100 Subject: [PATCH] fix loadbalance --- .../gatewayservice/RoutesConfiguration.kt | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/gateway-service/src/main/kotlin/com/michibaum/gatewayservice/RoutesConfiguration.kt b/gateway-service/src/main/kotlin/com/michibaum/gatewayservice/RoutesConfiguration.kt index 28e3617a..fdfc3d2b 100644 --- a/gateway-service/src/main/kotlin/com/michibaum/gatewayservice/RoutesConfiguration.kt +++ b/gateway-service/src/main/kotlin/com/michibaum/gatewayservice/RoutesConfiguration.kt @@ -1,9 +1,7 @@ package com.michibaum.gatewayservice -import com.michibaum.permission_library.Permissions import org.springframework.cloud.gateway.route.RouteLocator import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder -import org.springframework.cloud.gateway.route.builder.filters import org.springframework.cloud.gateway.route.builder.routes import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration @@ -17,31 +15,27 @@ class RoutesConfiguration { route { host("admin.michibaum.ch") // filters { AuthorizationPreFilter() } // Permissions.Admin_Service.CAN_SEND_REQUEST - uri("lb:admin-service") - } - route { - path("/admin") - uri("lb:admin-service") + uri("lb://admin-service") } route { host("authentication.michibaum.ch") // filters {} - uri("lb:authentication-service") + uri("lb://authentication-service") } route { host("javadoc.michibaum.ch") // filters { AuthorizationPreFilter() } // Permissions.JavaDoc_Service.CAN_READ - uri("lb:javadoc-service") + uri("lb://javadoc-service") } route { host("registry.michibaum.ch") // filters { AuthorizationPreFilter() } - uri("lb:registry-service") + uri("lb://registry-service") } route { host("usermanagement.michibaum.ch") // filters { AuthorizationPreFilter() } - uri("lb:usermanagement-service") + uri("lb://usermanagement-service") } route { host("google.michibaum.ch")