Spring-Loaded setup for Intellij

5.3k views Asked by At

I downloaded spring-loaded.jar and tried to set it up for IntelliJ but unfortunately it did not work.

So, here is my questions:

1) What needs to be done exactly to set it up? 2) How do I trigger hot-swap?

1

There are 1 answers

3
Brian Clozel On BEST ANSWER

I think you're looking for the spring-loaded project.

As stated in the official documentation, you have to add this java agent argument in your IntelliJ "run configuration" (the configuration that runs your application - it may be a Java class or a servlet container like Tomcat):

-javaagent:<pathTo>/springloaded-{VERSION}.jar

Once this agent is loaded, it watches *.class files on disk and reloads them if modified (by your IDE, for example).

Warning: depending on your application, and especially if it contains caches, data intialized at startup... you may have to write specific plugins or event listeners to reinitialize those.