Class ProductServiceClient

java.lang.Object
com.dani.bff.gateway.ProductServiceClient

@Component public class ProductServiceClient extends Object
HTTP client for the product service recommendation endpoint.
  • Constructor Details

    • ProductServiceClient

      public ProductServiceClient(@Qualifier("productServiceWebClient") org.springframework.web.reactive.function.client.WebClient webClient, DownstreamProperties properties)
  • Method Details

    • fetchRecommendedProducts

      public reactor.core.publisher.Mono<List<ProductRecommendation>> fetchRecommendedProducts(String userId)
      Fetches product recommendations for a user from the product service.
      Parameters:
      userId - authenticated user identifier
      Returns:
      recommendations supplied by the downstream service