server.port=8080
server.contextPath=/myapp
Run Code Online (Sandbox Code Playgroud)
Consider the above configuration in the application.properties of a spring boot application. What is the need of contextPath if we can't really run another spring boot application in the same port 8080. Can anyone provide some real time scenarios where this contextPath useful?
[edit] In my experience, when we deploy multiple web applications (web applications contexts) to single tomcat instance running on 8080 port the context path is used to distinguish the applications. This is what kept me …