Spring Boot – How to change Context Path

In Spring Boot, to change the context path, update server.contextPath properties. The following examples update the context path from / to /mkyong or http://localhost:8080/mkyong Note By default, the context path is “/”. P.S Tested with Spring Boot 1.4.2.RELEASE 1. Properties & Yaml 1.1 Update via a properties file. /src/main/resources/application.properties server.port=8080 server.contextPath=/mkyong 1.2 Update via a …

Read more