Spring Web MVC handles incoming requests by providing a servlet called DispatcherServlet. It is also called a Front Controller since it is the first part of the controller that handles incoming requests and dispatches them to other controller implementations.
By default, the DispatcherServlet will be called for every request that is made to a URL starting with /. You can change this so-called context path by setting the server.servlet.contextPath property in the application.properties file:
server.servlet.contextPath=/my-app
In the preceding example, the DispatcherServlet, and thus your application, will only respond to URLs starting with /my-app.