0

我想改变我们的基础设施以利用 Jetty 和快速应用程序开发。

不久,我想提供静态内容。我在 Jetty 文档中找到了这样的解释。

<Configure class="org.mortbay.jetty.handler.ContextHandler">
    <Set name="contextPath">/static</Set>
    <Set name="resourceBase">D:/LocalProjects/myproject/html/static/
    </Set>
    <Call name="addHandler">
        <Arg>
            <New class="org.mortbay.jetty.handler.ResourceHandler"/>
        </Arg>
    </Call>
</Configure>                        

上面配置的 Maven 等效项是什么?

谢谢

4

1 回答 1

1
  <contextHandlers>
       <contextHandler implementation="org.eclipse.jetty.server.handler.ContextHandler">
           <contextPath>/static</contextPath>
           <resourceBase>D:/LocalProjects/myproject/html/static/</resourceBase>
           <handler implementation="org.eclipse.jetty.server.handler.ResourceHandler"/>
        </contextHandler>
  </contextHandlers>
于 2011-02-23T18:16:10.363 回答