Maven Jetty-仅修改静态文件时不要重新加载整个应用程序 [英] Maven Jetty - do not reload the whole application when modifying only static files

查看:108
本文介绍了Maven Jetty-仅修改静态文件时不要重新加载整个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Maven Jetty插件非常好(我使用的是6.1.26版).唯一令人烦恼的事情涉及静态文件的修改. 我的Web应用程序使用Spring,遵循标准的webapp Maven布局,并且基本上我不希望在更改JSP或CSS文件时重新加载整个上下文.

Maven Jetty plugin is very nice (I'm using version 6.1.26). The only annoying thing concerns static files' modifications. My web application uses Spring, follows the standard webapp Maven layout and I basically do not want the whole context to be reloaded whenever I change a JSP or a CSS file.

我检查了配置设置,但没有找到任何有关此的信息.

I checked the configuration settings, but didn't find anything about this.

有什么主意吗?

提前谢谢!

Rolf

推荐答案

您可以设置手动重新加载,并且:

You can set manual reload and:

  1. 您的IDE(即Eclipse)会将静态资源复制到目标目录,以便透明地对其进行更新.
  2. 当您在Java类中进行更改时,您只需在码头过程中按Enter键即可重新加载.

要设置手动重新加载,请执行以下操作:

To set manual reloading:

<plugin>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>maven-jetty-plugin</artifactId>
    <version>6.1.26</version>
    <configuration>
        <reload>manual</reload>
    </configuration>
</plugin>

这篇关于Maven Jetty-仅修改静态文件时不要重新加载整个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆