spring-boot: Devtools reload doesn't work with spring-boot-maven-plugin

After reading about the new dev tools features I decided to try it out. I generally run my apps with mvn spring-boot:run. So after the app started up (with mvn spring-boot:run), changing some controller code and compiling the app, the app reload didn’t happen as I expected. Running the app standalone, however, does reload as expected.

The docs do not mention any constraints about how your run you app. Should the Maven plugin also support devtools or will this not be supported?

Tried with 1.3.0.M1 and 1.3.0-BUILD-SNAPSHOT.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 1
  • Comments: 37 (13 by maintainers)

Commits related to this issue

Most upvoted comments

@snicoll I just added the enabled fork but modifications to myapp.WebSecurityConfig didn’t reload the server. My POM file now looks like this:

...
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork>
                </configuration>
            </plugin>
        </plugins>
    </build>
...

Sorry if I’m dragging this issue on any longer, but it’s related, and I’m certain more newb like myself would be googling this without any help.

And i totally second adding it to start.spring.io

PS- Future Newbs react with a heart if this was helpful.

I’m using IntelliJ. Below are gifcasts of the two workflows:

mvn spring-boot:run (not working)

boot-mvn-devtools

So basically, make changes to controller and then Make project. This compiles the changed classes to the target directory as mvn compile would do.

Standalone (working)

boot-app-devtools

You can reproduce this issue if you create Spring Boot application and name the application folder “spring-boot”

ok, strange, it was enough to change my folder name under git directory.

does it mean that my project folder shouldn’t be named ‘spring-boot-starter’ ? is it documented ‘feature’ ? 😃

I lost 2 hours of my life because the folder name was spring-boot of an example project I was debugging. For the sake of everything holy, fix this!!!