I have a spring boot application with bunch of rest controllers (@RestController).
I use the following property in application.properties
file to set the base url:
server.context-path=api
This property changes the base url for my static resources, too. I don't want them to change, how can I do that?
Note1
Why I want to do that? I want to serve a single page application (react app) on my server, and I want most of my requests made to /api/**
to be authorized. I want all other GET requests to be handled by the react router. This is why I don't want the base URL for my static resources to change.