pom.xml配置:
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.2.v20140723</version>
<configuration>
<scanIntervalSeconds>2</scanIntervalSeconds>
<webAppConfig>
<contextPath>/</contextPath>
<defaultsDescriptor>${basedir}/src/main/resources/jetty/webdefault.xml</defaultsDescriptor>
</webAppConfig>
<httpConnector>
<port>8081</port>
</httpConnector>
</configuration>
</plugin>
webdefault.xml中设置:
useFileMappedBuffer参数=false
解决静态文件被锁定问题。