【问题标题】:Is possible use Server-sent Events front de back-end and listen it from other back-end without use a front-end browser?是否可以在不使用前端浏览器的情况下使用服务器发送的事件前端并从其他后端监听它?
【发布时间】:2019-01-03 12:18:31
【问题描述】:

我有一个关于服务器发送事件的问题,我想在 Spring Boot 应用程序中实现,但我想从其他 Spring Boot 应用程序或后端监听这些事件是可能的。

【问题讨论】:

    标签: java spring spring-boot events server-sent-events


    【解决方案1】:

    是的,您可以使用支持 SSE 的网络客户端。 JerseySpringBoot 与许多其他库一样有这样的客户端。

    您可以在此处找到插入 SSE 服务器的简短代码示例:https://github.com/streamdataio/streamdataio-spring-webflux

    与这篇博文有关:https://streamdata.io/blog/using-spring-web-flux-as-a-java-client-of-streamdata-io/

    这应该让您深入了解如何使用 Spring WebFlux 进行操作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-25
      • 1970-01-01
      • 2018-09-15
      • 2021-06-12
      • 2015-12-24
      相关资源
      最近更新 更多