码头配置 - java.lang.ClassNotFoundException:org.eclipse.jetty.server.ProxyConnectionFactory

Jetty Configuration - java.lang.ClassNotFoundException: org.eclipse.jetty.server.ProxyConnectionFactory

我正在尝试测试有关 Proxy / Load Balancer Connection 的一些 Jetty 配置,在代理协议部分有一个示例:

<Call name="addConnector">
  <Arg>
    <New class="org.eclipse.jetty.server.ServerConnector">
      <Arg name="server"><Ref refid="Server" /></Arg>
      <Arg name="factories">
        <Array type="org.eclipse.jetty.server.ConnectionFactory">
          <Item>
            <New class="org.eclipse.jetty.server.ProxyConnectionFactory"/>
          </Item>
          <Item>
            <New class="org.eclipse.jetty.server.HttpConnectionFactory">
              <Arg name="config"><Ref refid="httpConfig" /></Arg>
            </New>
          </Item>
        </Array>
      </Arg>
      <Set name="host"><Property name="jetty.host" /></Set>
      <Set name="port"><Property name="jetty.http.port" default="80" /></Set>
    </New>
  </Arg>
</Call>

问题是码头在启动时抛出 java.lang.ClassNotFoundException: org.eclipse.jetty.server.ProxyConnectionFactory 因为 ProxyConnectionFactory class 不在库中。 搜索它,我发现它在 jetty-server 中,用于 jetty 9.3.5(对于 java 8),但我使用的是版本 9.2.7.

有谁知道这个配置在我的 9.2.7 版本的另一个包中是否可用?在当前版本之前,我没有在文档中找到任何关于 ProxyConnectionFactory 可用性的信息。

org.eclipse.jetty.server.ProxyConnectionFactoryintroduced in Jetty 9.3.0.M2,作为对 PROXY 协议的一般支持的一部分。

抱歉,Jetty 9 中没有。2.x 系列。