简体   繁体   English

完美工作 Eclipse 项目在 Tomcat 上抛出 404

[英]Perfectly Fine Working Eclipse Project throws 404 on Tomcat

I have a web application which includes Spring Boot, Joinfaces, JSF and Spring Security .我有一个 web 应用程序,其中包括Spring Boot, Joinfaces, JSF and Spring Security This web application works excellent when i run in ECLIPSE IDE.当我在 ECLIPSE IDE 中运行时,此 web 应用程序运行良好。 All pages works fine with 0 Error.所有页面都可以正常工作,错误为 0。

The thing is when i do mvn install and package this project into WAR and deploy it in TOMCAT its just not working.问题是当我执行 mvn install 和 package 这个项目到 WAR 并将它部署到 TOMCAT 时它只是不工作。 No deploy error.没有部署错误。 Just 404 when i try to reach my pages.当我尝试访问我的页面时,只有404

What can cause this?什么会导致这种情况? Why it is working perfectly fine on Eclipse but not working on Tomcat after packaging?为什么它在 Eclipse 上工作得非常好,但在打包后不能在 Tomcat 上工作?

Where should i look to solve this?我应该在哪里解决这个问题?

I found the problem.我发现了问题。

The thing is rest of the project was built to be run on embedded Tomcat as JAR.问题是项目的 rest 被构建为在嵌入式 Tomcat 上运行,如 JAR。 So the packaging was the problem.所以包装是个问题。 I ran the application as java -jar on tje distant machine and it worked.我在远程机器上以 java -jar 的形式运行该应用程序,它工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM