Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Spring引导下运行服务器时,在dev模式下启动GWT_Gwt_Spring Boot_Gwt Dev Mode - Fatal编程技术网

在Spring引导下运行服务器时,在dev模式下启动GWT

在Spring引导下运行服务器时,在dev模式下启动GWT,gwt,spring-boot,gwt-dev-mode,Gwt,Spring Boot,Gwt Dev Mode,我已经使用SpringBoot和GWT2.6.0创建了web应用程序 已更改生成文件的位置: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>${gwt.plugin.version}</version&

我已经使用SpringBoot和GWT2.6.0创建了web应用程序

已更改生成文件的位置:

<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <version>${gwt.plugin.version}</version>
            <executions>
                <execution>
                    <configuration>
                        <module>my.module</module>
                        <webappDirectory>src/main/resources/gwt-public/</webappDirectory>
                    </configuration>
                    <goals>
                        <goal>compile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

org.codehaus.mojo
GWTMaven插件
${gwt.plugin.version}
我的模块
src/main/resources/gwt public/
编译
如果独立运行我的应用程序,一切正常,因为所有需要的文件都可以访问

但问题是——如何在开发模式下运行GWT(来自Intellij IDEA)。我试图在noserver模式下运行它,它会启动,但在浏览器中什么也并没有


据我所知,我需要指定dev插件使用的war目录,所以这意味着我需要显式地将packaging设置为war?我对此没有明确的想法。

您可以编译一个war,运行服务器,然后运行gwt debug,但在浏览器打开后,将url更改为localhost:xxxx,不管spring正在运行什么,但保持servercode=127.0.0.1不变

或者你可以在maven插件上使用gwt:debug来编译。
看这里:

我通过将其添加到您的gwt maven插件配置中实现了这一点:

false

如果要按照Zerkotin的建议更改URL,那么我提供了以下附加属性:

<noServer>true</noServer>
true
停止mvn gwt插件启动嵌入式Jetty实例。但这不允许我动态地重新编译

为了让它在超级开发模式下工作,我在我的gwt maven插件配置中设置了:

真的 真的


然后我像往常一样启动了SpringBoot(使用java-jarmyweb.jar)。然后,我启动了maven gwt插件(mvn gwt debug),将IntelliJ连接到调试器(使用远程),转到代码服务器URL(不是我的应用程序URL),设置那些书籍标记,然后转到我的应用程序URL,当我想重新编译时,我只需点击那些书签。我与之斗争了几个小时,看起来它非常简单。打开localhost/index.html?gwt.codesvr=127.0.0.1:9997会有所帮助。谢谢