I'm currently developing a Spring Boot microservices project, but restarting each service to apply changes can be quite tedious. I know that using `spring-devtools` can help streamline this, but I've found that it often requires a full clean and rebuild to function correctly. Since I'm using **Helix Editor** and not an IDE, `spring-devtools` doesn't offer much advantage for my workflow. I'm also aware of alternatives like **JRebel**, but I'm hesitant due to the licensing costs. To manage this, I've created two scripts, `loop-run.sh` and `watch-kill.sh`. The first one runs commands continuously to keep the Spring Boot server running, while the second one kills the server process whenever changes are detected. I've shared my project on GitHub under the **MIT License**: [Spring-Boot-Hot-Reload](https://github.com/allaboutevemirolive/spring-boot-hot-reload). Does anyone have suggestions for improving this setup or alternative solutions?
1 Answer
It sounds like you're really focused on development! If that's the case, you might want to check out DCEVM. It allows for hot-swapping in Java development, and it works great with Spring Boot. Just be aware there's some limitations when it comes to changing annotations, but it's a solid tool to consider. Plus, there’s documentation for using it with JDK 17!
I've noticed DCEVM has its quirks too, especially with app caches. JRebel seems to handle those issues better with more extensive integration, but I get it—those licensing fees can be a bummer. I'd say weigh the pros and cons before making a decision.