Reputation: 693
We are using spring boot for our web application. The context root is defined in WEB-INF/classes/common.properties as follows.
server.contextPath=<>
However after deployment the above value is not read and Tomcat is registering the name of the war as the context root.
Spring boot version = 1.5.2 Tomcat version = 8.0.53
Upvotes: 0
Views: 1800
Reputation: 406
As I know, server.contextPath =
not work for war
file, it only work you deploy your application with jar
file and Tomcat embedded
.
If you want deploy your application with Tomcat
and War
file. You should add finalName
setting to pom.xml
. Example:
<build>
...
<finalName>context path</finalName>
</build>
Upvotes: 1