gwtspring-bootgwt-dev-mode

Launch GWT in dev mode while running server on Spring-boot


I have created web application using Spring boot and gwt 2.6.0.

Changed location of generated files:

<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>

And if running my application standalone everything works correctly, because all the needed files are accessible.

But the question is - how to run GWT in development mode (from Intellij IDEA). I am trying to run it in -noserver mode, it launches but in browser there is nothing.

As I understand I need to specify war directory which is used by dev plugin, so it means I need to explicitly set packaging to war? I have no clear thoughts about it.


Solution

  • you can compile a war, run the server and then run gwt debug, but after the browser opens change the url to the localhost:xxxx whatever spring is running, but leave the servercode=127.0.0.1 as is.

    or you can use gwt:debug on maven plugin instaed of compile. looky here: http://mojo.codehaus.org/gwt-maven-plugin/debug-mojo.html