问题描述
我从2.5开始使用GWT超级开发模式,没有任何问题。最近我同时将Eclipse和GWT升级到2.6。一切似乎都在进行,直到我对代码进行了任何更改:
I have used GWT Super Dev Mode since 2.5 without any problems. Recently I upgraded Eclipse and GWT to 2.6 at the same time. Everything seems to work up to the point I make any changes to my code:
- 启动web服务器 - ok
- 启动超级开发模式codeserver - 初始编译正常
- 打开代码服务器 - ok
- 打开页面 - ok
- 更改代码
- 点击书签开启模式 - 编译正常
- 重新加载页面 - 无变化! >
- Start web server - ok
- Start super dev mode codeserver - initial compile ok
- Open code server - ok
- Open page - ok
- Make code change
- Hit bookmark "Dev mode on" - compile ok
- Reload page - no changes!?
我在我的运行配置中使用-bindAddress 192.168.5.151以便能够浏览不同的设备。如果我删除了-bindAddress,那么一切都可以再次运行。为什么?
I use "-bindAddress 192.168.5.151" in my run configs to be able to browse from different devices. If I remove -bindAddress everything works again. Why?
推荐答案
在GWT 2.6中,为了使SuperDevMode更加安全(并且BTW,现在默认启用,所以不需要要设置 devModeRedirectEnabled
属性,它现在只在 localhost
或 127.0上启用。 0.1
默认情况下。
In GWT 2.6, to make SuperDevMode more secure (and, BTW, it's now enabled by default, so no need to set the devModeRedirectEnabled
property any longer), it's now only enabled on localhost
or 127.0.0.1
by default.
如果您打开浏览器控制台,您应该看到一行内容如下所示:
If you open your browser console you should see a line saying something like:
您可以在 devModeUrlWhitelistRegexp
配置属性中使用regexp将更多代码服务器URL列入白名单。仅供参考,默认配置会读取这样的内容:
You can whitelist more codeserver URLs using a regexp in the devModeUrlWhitelistRegexp
configuration property. FYI, the default configuration would read something like this:
<set-configuration-property name="devModeUrlWhitelistRegexp" value="http://(localhost|127\.0\.0\.1)(:\d+)?/.*" />
在您的情况下,您可以使用:
In your case, you'd use:
<set-configuration-property name="devModeUrlWhitelistRegexp" value="http://(mymachinename|192\.168\.5\.151)(:\d+)?/.*" />
顺便说一下,这已在发行说明中明确提出:
BTW, this was explicitly called out in the release notes: http://www.gwtproject.org/release-notes.html#Release_Notes_2_6_0
这篇关于GWT超级开发模式 - bindAddress - 更改不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!