In order to make it work, you need to:
1)Have devtools enable in maven or gradle.
In maven it looks like :
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope><!-- -->
<optional>true</optional>
</dependency>
2)In IntellijIDEA: go in settings(ctrl +alt+s) -> Build,Execution,Deployment -> compiler, check "Build project automatically"
3)In IntellijIDEA: press ctrl+shift+a then type "registry" and click on it. Then enable the option "compiler.automake.allow.when.app.running".
4) RESTART intellijIDEA !! I lost few hours because of this :/
It should now be working.
Please note that:
-You don't need additional-paths or trigger-file for this to work as intended.
-If you are using the maven launch parameter -Dspring-boot.run.fork=false
to enable debugging, then devtools are disabled, so it should not reboot on code change.
-in the yaml file, you need to use quotes for parameters coming from the pom. If you don't, the project will run the first time and then fail on reboot.
spring:
profiles:
active: '@spring.profiles.active@'
IT WORKS WITH INTELLIJIDEA COMMUNITY EDITION, it's worth the caps as many answers say it works only with ultimate...