Spring boot war file deploy on Tomcat

眉间皱痕 提交于 2019-12-01 19:13:30

Just tried this here, and could reproduce the exact same behaviour.

As silly as it sounds, most likely you are running your external tomcat under a Java 1.7 JRE (speculation), while having compiled your code against 1.8 (we know this from your pom).

Strangely, there is no error, and the app appears in the manager app, but then you get a 404 when you're trying to access it.

One way to confirm this is to look at your tomcat log output. Do you see the Spring Boot banner? Probably not.

Try localhost:8080/gs-rest-service/greeting on your Tomcat. Tomcat usually gives each WAR application it hosts a name. This name is than used as root part of your URL. In most cases it is name of the WAR file, which is gs-rest-service in your case.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!