Preliminary path for RequestMapping for all controller methods in a specific package

I have a Spring boot application with several controllers in one package. I would like to add "/ api /" to all @RequestMapping paths and assume that this can be done in one place. I cannot change server.contextPath because I have other things that need to be served from the root context.

Is it possible to do something like this using a controller tip?

Any guidance is appreciated.

+4
source share
1 answer

Source: https://habr.com/ru/post/1606874/


All Articles