I\'m trying to to mix mvc and rest in a single spring boot project.
I want to set base path for all rest controllers (eg. example.com/api) in a single place (I don\'
For those who use YAML configuration(application.yaml).
Note: this works only for Spring Boot 2.x.x
Spring Boot 2.x.x
server: servlet: contextPath: /api
If you are still using Spring Boot 1.x
Spring Boot 1.x
server: contextPath: /api