Spring Boot recompile classes / reload resources on save or frame deactivation

I have started a Spring Boot project and have not found a good way of a simple edit-refresh workflow from IntelliJ.
My intention would be to edit an html file, hit refresh in the browser, and the content would be up-to-date without application restart. On top of that it would be nice to have up-to-date classes too. For that, I am using spring loaded. The main problem is that resources (and classes) have to be copied into the target directory to have an effect.
The best that I could achieve was to run the application externally and check IntelliJ settings > Compiler > Make project automatically. Even in this case, the resources are not always updated (if I don't explicitly hit Command-S, but rely on autosave, resources are not copied). Of course, if I run the app within IntelliJ, this solution won't work and I have to compile each modified file (even resource files) so that they are copied into the target directory. I am using gradle for build and IntelliJ IDEA 15 EAP.

Does anybody know a good solution for this?

Thank you for any kind of help,

1 comment
Comment actions Permalink

Hi David,

indeed, such a feature is not available yet, please watch https://youtrack.jetbrains.com/issue/IDEA-140158

Current workarounds:
1) Make explicitly (will not reload classes while run config active)
2) With Spring 1.3, use devtools and "hack" to enable automatic background compilation https://youtrack.jetbrains.com/issue/IDEA-141638



Please sign in to leave a comment.