简体   繁体   English

无法从命令提示符运行Spring Boot应用

[英]Can't run Spring Boot app from Command Prompt

在此处输入图片说明

This is my project structure. 这是我的项目结构。 I created executable jar file of this Spring boot app. 我创建了这个Spring启动应用程序的可执行jar文件。 When i try to run it from Command Prompt i get this error : 当我尝试从命令提示符运行它时,出现此错误:

Caused by: java.io.FileNotFoundException: ServletContext resource [/WEB-INF/tiles.xml] cannot be resolved to URL because it does not exist
        at org.springframework.web.context.support.ServletContextResource.getURL(ServletContextResource.java:156) ~[spring-web-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]

This is due to Regression Error In Spring Boot 1.4.3 with Fat Jar packaging. 这是由于带有Fat Jar包装的Spring Boot 1.4.3中的回归错误。 Refer to this for a solution: 参考此为解决方案:

https://github.com/spring-projects/spring-boot/issues/8291 https://github.com/spring-projects/spring-boot/issues/8291

if I'm correct, you're dealing with JSPs. 如果我是正确的,那么您正在处理JSP。 Ideally, the packaging should be WAR instead of JAR. 理想情况下,包装应为WAR而不是JAR。 Try packaging the project as a WAR and then try to run the same. 尝试将项目打包为WAR,然后尝试运行相同的项目。

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

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