您的位置:首页 > Web前端 > CSS

Maven+jetty锁定js,css问题

2014-03-07 18:23 316 查看
1.在你使用的Jetty版本的jetty.jar中找到webdefault.xml,它在jar文件中的路径是org/mortbay/jetty/webapp/webdefault.xml。把它拷贝到项目中,比如src/main/resources/webdefault.xml。

2.找到useFileMappedBuffer参数,把值设成false

3.pom.xml文件中

<plugin>

<groupId>org.mortbay.jetty</groupId>

<artifactId>jetty-maven-plugin</artifactId>

<version>8.1.13.v20130916</version>

<configuration>

<scanIntervalSeconds>2</scanIntervalSeconds>

<stopKey>foo</stopKey>

<stopPort>9999</stopPort>

<webAppConfig>

<contextPath>/</contextPath>

<defaultsDescriptor>src/main/resources/webdefault.xml</defaultsDescriptor>

</webAppConfig>

</configuration>

</plugin>

添加<defaultsDescriptor>src/main/resources/webdefault.xml</defaultsDescriptor>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: