简体   繁体   English

Web开发(Spring MVC),浏览器更新缓慢

[英]Web development (Spring MVC), slow updates to browser

I'm developing a spring MVC application. 我正在开发Spring MVC应用程序。 Spring version 3.1. 春季版3.1。 The IDE i'm using is Eclipse (SpringSource) and browser is Chrome. 我正在使用的IDE是Eclipse(SpringSource),浏览器是Chrome。 I think it is a tomcat server. 我认为这是一个tomcat服务器。

When I saving the Java files they are loaded to the server, it takes some time to load buts it's OK and i see clearly when it's done. 当我将Java文件保存到服务器时,需要花费一些时间来加载,但是还可以,并且可以清楚地看到完成的时间。

But the thing that annoys me alot is that I don't see when the JavaScript, JSP and CSS files are being updated. 但是令我非常恼火的是,我没有看到何时更新JavaScript,JSP和CSS文件。 Sometimes it's updating fast and sometimes it feels like ages. 有时更新速度很快,有时感觉就像是年龄。

Can I somehow see when these files are being updated or can I force the browser to update them? 我可以以某种方式查看何时更新这些文件,还是可以强制浏览器更新它们?

Thanks. 谢谢。

Just fixed this! 刚刚解决这个!

In Eclipse I doubleclicked my server in the Servers window. 在Eclipse中,我在“服务器”窗口中双击了服务器。

Then in the overview window that pops up I selected the "Enable JMX-based reloading" tick box. 然后,在弹出的概述窗口中,我选择了“启用基于JMX的重新加载”复选框。

It defines patterns for files that should be copied to deployed application without triggering a reload. 它定义了应在不触发重新加载的情况下复制到已部署应用程序的文件的模式。 So I just made sure I had all files needed there in the list. 因此,我只是确保列表中有所需的所有文件。 (*.css, *.js, *.jsp) (* .css,*。js,*。jsp)

Now it updates fast as hell. 现在,它更新得像地狱一样快。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM