I'm fairly new to Spring Boot, but I want to want to build my application in such a way, that can deploy mulitple applications on the same server and i want to distinguish the applications in the rest path.
For example, say i have the applications user-management and animal-management and i have a rest-controller in both of them responding to the path \names
.
Both those applications run on localhost:8080
so when sending a GET
to localhost:8080/users/names
, I want the controller of the user-management to react and the same for animal with a GET
to localhost:8080/animals/names
.
I can put a @RequestMapping
on the controller to acchieve the names
part, but if i do the same on the application, it gets ignored.
Basically I want to tell my application "Every controller in this application should be mapped to the rest path specified on the controller, but prefixed with 'x'".
How can I do that.