解決辦法:
1.從jetty的jar包中(位置可能不同,有的jetty-web中)拷貝一份webdefault.xml文件
2.將webdefault.xml 中的useFileMappedBuffer 設置為false。
<init-param>
<param-name>useFileMappedBuffer</param-name>
<param-value>false</param-value>
</init-param>
3.將webdefault.xml文件放在maven web 的pom同級目錄
4.修改maven中<configuration>屬性,在屬性中添加如下配置
<webAppConfig>
<contextPath>/meds</contextPath>
<defaultsDescriptor>webdefault.xml</defaultsDescriptor>
</webAppConfig>
注意:jetty版本不同,可能配置並不相同,有可能不好用,以上配置是在9.4.1.v20170120中是好用的,但在別的版本下可能不好用。
