可以使用 Java 库 "jetty-http-client-transport-async" 来代理 EventSource 接口。
首先,需要将其添加到项目的依赖中,在 Maven 中可以这样添加:
<dependency>
<groupId>org.eclipse.jetty.http</groupId>
<artifactId>jetty-http-client-transport-async</artifactId>
<version>9.4.32.v20200930</version>
</dependency>