How to set Spring root context path

前端 未结 1 1524
野的像风
野的像风 2021-01-22 03:59

I am a Spring newbie and am putting together a Spring web-app (not Spring-boot - how much difference does this make?). Deployment is on a Tomcat 7 server.

The app is up

相关标签:
1条回答
  • 2021-01-22 04:23

    This is not related to Spring MVC but to specific server, by default Tomcat gets your WAR name as context root. If you want to change this, you can always rename your WAR file or I recommends to change your pom.xml to build your WAR file with final name, here is how to do this:

    <build>
      <finalName>finalName</finalName>
     . . .
    </build>
    
    0 讨论(0)
提交回复
热议问题