문제

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은 무엇입니까?

감사합니다

도움이 되었습니까?

해결책

  <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>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top