Migrating from Spark to Javalin: You Can't Strangle a Web Framework
Changing a web framework must be done the same way you would change an aircraft engine midair. You do it prudently, in small, safe steps all the way. You test everything so no surprise surface when you do the switch.
I moved LogEze to Javalin. It is a product I have built since 2014, and it ran on the Spark Java web framework until recently. The cutover was one environment variable. I flipped it and everything switched from Spark to Javalin at once. Most of the work was in the preparations. Two weeks of them were hands-on work, abstracting Spark away from the core of the app far enough that a parallel Javalin implementation could be built alongside it and switched on safely. The rest started a lot earlier, with spikes to settle on the replacement and a shared super class that every controller already ran through, in place more than two years before I needed it.