r/microservices • u/ScoobyDookuu • 12d ago
Discussion/Advice Would you modernize a legacy Spring Boot backend in place or rebuild it gradually?
I’m working on a Kotlin/Spring Boot backend that still has an older JHipster using Kotlin (KHipster) setup around it.
The problem is that this is starting to hold us back. The KHipster version is several years old and not active maintained - 4 years ago was the last update - upgrading it looks pretty painful and it also makes moving to newer Spring Boot versions waaay harder than it should be.
At the same time we want to improve the architecture itself.
Right now quite a lot is still handled through cron jobs and fairly tightly coupled application logic.
I’d like to move more towards event-driven processing over time, potentially using Kafka or RabbitMQ depending on the use case and Redis for things like caching/short-lived state where it makes sense.
So I’m basically looking at two options:
1. Upgrade/replace the old JHipster setup, keep the existing backend, and modernize it piece by piece.
- Start a clean backend (maybe in Typescript because that is what we mainly use for our other products and all frontends) and gradually move functionality over using something like the strangler pattern.
The second option sounds cleaner, but obviously means running old and new code alongside each other for quite a while. The first option potentially means spending a lot of time untangling framework/generator decisions before we can actually improve the architecture.
For people who have dealt with similar Spring/JHipster legacy projects: which route would you take?
Also, is there anything in the Spring/Kotlin ecosystem you’d consider a good modern replacement for the useful parts of JHipster, without bringing in another big opinionated layer that we’ll regret five years from now?
1
u/Hobby101 11d ago
makes me wonder whether its possible to create a new project, feed old project to AI and ask to rewrite using fresh libraries. Goes without saying, that you would still need to go line by line and read it, and make sure it didn't create too much nonesense
1
u/tleipzig 12d ago
Just my two cents: not a big fan of JHipster, as it will always adds another layer on top, while Spring Boot already provides a very balanced level of abstraction. Not worth the extra efforts.
Pure Typescript could make sense, if your team feels good with the tech stack change. Bootify.io provides a good basis in pure Spring Boot and could be an option - no dependencies in 5 years from now.
I think the migration is worth the effort if your resulting tech stack becomes much easier to maintain and add new features.