Spring-boot war external Tomcat context path

We use Spring Boot, and I created a WAR, not a JAR, to deploy to a regular Tomcat server. Everything seems to be working fine, except that the context path is not set properly. Any relative paths in my index.html do not work.

When downloading an application in a browser, this link

<link type="text/css" rel="stylesheet" href="app.min.css" />

trying to boot from http: // localhost: port / app.min.css instead of http: // localhost: port / contextpath / app.min.css ". Attempting to set this to application.properties does not work as it looks like this value only works for the integrated Tomcat server.

+4
source share
1 answer

, server.context-path, server.* tomcat. WAR-, tomcat.

, ./conf/Catalina/localhost/ , , .. contextpath.xml .

+5

All Articles