【问题标题】:How to call external service (Non MSA) from Api gateway (Zuul) in spring boot application如何在 Spring Boot 应用程序中从 Api 网关(Zuul)调用外部服务(非 MSA)
【发布时间】:2018-04-14 15:29:00
【问题描述】:

在我的 Spring Boot 微服务应用程序中,我在我的 API 网关中使用 Zuul 代理作为边缘服务。我需要调用未在尤里卡服务器(非微服务架构)中注册的外部服务。如何从我的 api 网关调用该外部服务。 (提前致谢)

【问题讨论】:

    标签: spring-boot microservices netflix-eureka netflix-zuul api-gateway


    【解决方案1】:

    在您的application.properties 文件中,您配置如下:

    zuul.routes.external.path /external/**
    zuul.routes.external.url http://urltoexternalservice.com/external
    

    【讨论】:

    • 谢谢@mohamed。它工作正常。这个我试过了。
    猜你喜欢
    • 2021-11-11
    • 1970-01-01
    • 2020-11-27
    • 2021-05-01
    • 1970-01-01
    • 2021-01-15
    • 2021-02-22
    • 2019-10-16
    • 2016-03-26
    相关资源
    最近更新 更多