2

I have a project that will run fine with mvn spring-boot:run, and I would like the ability to hot swap automatically after compiling. I setup the dependency as follows:

        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>1.2.5.RELEASE</version>
            <dependencies>
                <dependency>
                    <groupId>org.springframework</groupId>
                    <artifactId>springloaded</artifactId>
                    <version>1.2.4.RELEASE</version>
                </dependency>
            </dependencies>
        </plugin>

However, I'm not seeing changes in response to a recompile. Is something more needed?

end-user
  • 2,845
  • 6
  • 30
  • 56

1 Answers1

0

Spring loaded will hot swap only when you update your classes i.e. you build the project, it won't do the recompilation for you.

In case of intellij you need to hit Ctrl+F9 (or its equivalent on mac), or enable ‘Make Project Automatically’ to automatically compile your code whenever a file is saved.

tsachev
  • 1,111
  • 10
  • 14