0

I have a spring boot project setup on an Eclipse Environment that works fine, with the spring-boot-devtools and all configurations set to have hot deploy of static resources (.less/.js/.jsp) and .java files.

Unfortunately all the configuration set for Eclipse don't work with intelliJ, since when one file is saved, it doesn't trigger the maven goals necessary to compile the .less file and to refresh the static content.

What are the steps to get it working on both IDEs? I've tried to use save Actions plugin but it doesn't work fine.

Gabriel F
  • 161
  • 5

1 Answers1

0

tldr;

You'll need to select Build → Make Project in order to trigger a restart.


Per the Spring Boot Documentation:

Triggering a restart

As DevTools monitors classpath resources, the only way to trigger a restart is to update the classpath. The way in which you cause the classpath to be updated depends on the IDE that you are using. In Eclipse, saving a modified file will cause the classpath to be updated and trigger a restart. In IntelliJ IDEA, building the project (Build → Make Project) will have the same effect.

Kyle Anderson
  • 6,801
  • 1
  • 29
  • 41
  • Thank you for the answer, but unfortunately this doesn't work. I try to make the project and nothing happens :( I need maven goals to be processed so I can compile .less classes, for example... – Gabriel F May 26 '16 at 16:06
  • @GabrielF It'd be great if you could upload a sample project that works in Eclipse but doesn't in IntelliJ. I'm flying blind here... – Kyle Anderson May 26 '16 at 18:11
  • Now I got. What I did is putting a trigger on maven goal "compile" that runs after "Make Project". So every time I trigger make, it compiles the .less into .css and works fine. Thank you ;) Unfortunately I think it's not possible to bind this event after a save action, just after "Make" – Gabriel F May 26 '16 at 18:14