解决myeclipse maven jetty启动后无法修改静态资源js css文件

来源:互联网 发布:淘宝卖家少不了 编辑:程序博客网 时间:2024/05/15 04:21

在myeclipse下使用 jetty-maven-plugin的时候项目启动后无法修改静态资源文件 js,css 解决如下:

使用的是新版本9.0.3.v20130506

把jetty-webapp-9.0.3.v20130506.jar包中的webdefault.xml取出修改useFileMappedBuffer 把原来默认true改为false 

pom配置plugin:

<plugin><groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId>  <version>9.0.3.v20130506</version>  <configuration>  <scanIntervalSeconds>3</scanIntervalSeconds>  <webApp>      <contextPath>/</contextPath>      <defaultsDescriptor>${basedir}/src/main/webapp/WEB-INF/webdefault.xml</defaultsDescriptor>    </webApp>  </configuration></plugin>
把文件放在项目中的指定路径${basedir}/src/main/webapp/WEB-INF/webdefault.xml我的项目结构路径如上,${basedir}为项目在你电脑上的路径解决了头疼的问题。。。希望也能帮到你
	
				
		
原创粉丝点击