I have developed a micro service (Spring Boot REST service, deployed as executable JAR) to track all activities from third party projects as my requirement and its working now.
Currently it's working apart of some projects, and now I have updated service with some additional features.
But I can't move it to live server without restarting the existing service as it is deployed as jar. I'm afraid to restart my service, restart may be leads to lose data of integrated projects.
What improvements can I make in my architecture to solve my problem?
In Spring Boot this can be achieved by adding a DevTools module, just add the following dependency in your Spring Boots pom. xml and build it. Spring Boot DevTools module does exactly what developers needed, this eliminates the process of manually deploying the changes.
Another way to restart our application is to use the built-in RestartEndpoint from Spring Boot Actuator. In the above code, we are using the RestartEndpoint bean to restart our application. This is a nice way of restarting because we only have to call one method that does all the work.
Spring Boot in itself has nothing to do with microservices. It's a Spring module which simply makes the configuration of your app easier. As such, it absolutely can be used in a monolithic app.
What about JRebel plugin. It worked perfectly for me, but, unfortunately, it's not a free app. Like alternative, (i used this approach with Spring MVC, with Spring Boot it could be otherwise), I set up a soft link in work directory on a compiled path in JBoss (in my case it was dir with name target and *.class and *.jar files). As for me, the first solution with JRebel is the most appropriate for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With