GWT超级开发模式 - bindAddress - 更改不显示 [英] GWT Super Dev Mode - bindAddress - changes not showing

查看:163
本文介绍了GWT超级开发模式 - bindAddress - 更改不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从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:


  1. 启动web服务器 - ok

  2. 启动超级开发模式codeserver - 初始编译正常

  3. 打开代码服务器 - ok

  4. 打开页面 - ok

  5. 更改代码

  6. 点击书签开启模式 - 编译正常

  7. 重新加载页面 - 无变化! >
  1. Start web server - ok
  2. Start super dev mode codeserver - initial compile ok
  3. Open code server - ok
  4. Open page - ok
  5. Make code change
  6. Hit bookmark "Dev mode on" - compile ok
  7. 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:


忽略非白名单的开发模式网址:http://192.168.5.151:9876/

您可以在 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+)?/.*" />

顺便说一下,这已在发行说明中明确提出: http://www.gwtproject.org/release-notes.html#Release_Notes_2_6_0

BTW, this was explicitly called out in the release notes: http://www.gwtproject.org/release-notes.html#Release_Notes_2_6_0

这篇关于GWT超级开发模式 - bindAddress - 更改不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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