Mvc – Should Microservice still use web framework such as Spring

microservicesmvcspringspring-mvc

My understanding of Microservice architect is that much of the work is shifted to the front end client side in a single page application (SPA).

The SPA will then interact with the back end microservices.

This begs a question: Does Spring framework with MVC still relevant here?
I think only SpringBoot with Bean injection and JPA persistence support are still relevant. This is because in microservice architecture, the front end client side is single page app (SPA). We don't need the server side to worry about model view controller.

All the MVC will be irrelevant in the microservices architecture.

Please correct me. Thanks

Best Answer

Your frontend can (and possibly should) also be a microservice. That one can very well be implemented using a system like Spring MVC, using for example Thymeleaf as a templating system.
So yes, such things are still relevant, just not in your understanding of what a microservice is (which seems limited to some server process that spits out json for a javascript based web frontend to retrieve using ajax requests).

Related Topic