title: Hot to HotSwap code in Intellij in a Spring-Boot project?
body: <p>I'm using <code>spring-boot-starter</code> for a larger server project that opens a static socket for communication. For not always having to restart the server in <code>Intellij IDEA</code> after every code change (and thereby quit the socket connection), I'm trying to <strong>HotSwap</strong> the changed *.java code. </p>
  
  <p>I tried as follows without success:</p>
  
  <ul>
  <li>added the maven <code>spring-boot-devtools</code> dependency</li>
  <li>Settings > <code>Build project automatically [yes]</code></li>
  <li>Registry: <code>complier.automake.allow.when.app.running [true]</code></li>
  <li>Run Configuration > Update Policies: <code>Update classes and resources</code></li>
  </ul>
  
  <p>BUT: whenever I modify a class, my application restarts automatically. Of course this will also reload the classes, but then I could also trigger the restart myself at will. I'm not gaining anything by automated restarts.</p>
  
  <p>So I disabled the restarts via <code>spring.devtools.restart.enabled=false</code>. But then the code swap does not work until the server is restarted.</p>
  
  <p>But is it possible at all without explicit restarts?</p>
  
  <p>Sidenote: I'm not about hotswap a web-UI in the browser. I just want to have the java code reloaded.</p>