I've got multi-module application that make use of database-mapped models.
Also, i have to develop RESTful API that should make use of the same models.
Obviously, API should be produced whit help of the micro mvc.
But, how do i incorporate my micro mvc api into multi module mvc application?
The thing that bothers me most is routes.
How do i decide, which application should execute concrete route?
What I need - is to make a desicion based on first placeholder in a route.
For example, route
api/v1_1/user/show/1157
should be executed by micro mvc app
and
regular/user/show/1157
should be executed by 'regular' module of multi mvc app
and
blind/user/show/1157
should be executed by 'blind' module of multi mvc app