<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${plugin.jetty.version}</version>
<configuration>
<scanIntervalSeconds>1< /scanIntervalSeconds>
</configuration>
</plugin>
But resources are locked when js and css are modified, and jetty must be stopped before modification and saving. Most of the Internet is about the setting of mortbay. In fact, the jetty setting of eclipse is very simple, as long as this sentence is added to the web.xml:
<!-- These resources cannot be accessed without any framework start -->
<servlet-mapping >
<servlet-name>default</servlet-name>
<url-pattern>*.jpg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.png</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.gif</url-pattern>
</servlet-mapping>
<!-- 这些资源访问不进会任何框架 end -->
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
<init-param>
<param-name>useFileMappedBuffer</param-name>
<param-value>false</param-value>
</init-param>
</servlet>
org.eclipse.jetty static resource locking settings
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326848453&siteId=291194637
Recommended
Ranking