简体   繁体   English

如何将带有嵌入式tomcat的可执行.war包装成.exe?

[英]How to wrap executable .war with embedded tomcat into .exe?

I have standalone web application, uses embedded Tomcat, MVC Spring boot. 我有独立的Web应用程序,使用嵌入式Tomcat,MVC Spring启动。

How can I wrap it correctly into .exe, not to let final user modify property file. 如何将其正确包装到.exe中,而不是让最终用户修改属性文件。

The executable war,created with Maven 'mvn clean install' works just fine while launching from cmd. 使用Maven“mvn clean install”创建的可执行战争在从cmd启动时工作得很好。

I tried Launch4j , works well , generates exe file successfully with all in that but when I execute. 我试过Launch4j ,运行良好,成功生成exe文件,但是当我执行时。 I get this error. 我收到这个错误。

Well, I tried error handling but it does not solve my issue. 好吧,我尝试过错误处理,但它没有解决我的问题。

Error : 错误:

Whitelabel Error Page 白标错误页面

This application has no explicit mapping for /error, so you are seeing this as a fallback. 此应用程序没有/ error的显式映射,因此您将此视为回退。

Thu Apr 07 16:04:11 CEST 2016 There was an unexpected error (type=Not Found, status=404). Thu Apr 07 16:04:11 CEST 2016出现意外错误(type = Not Found,status = 404)。 /view/home.jsp /view/home.jsp

First as it is Spring Boot app do convert it into .jar packaging (that will have embedded Tomcat). 首先,因为它是Spring Boot应用程序将其转换为.jar包装(将嵌入Tomcat)。

Then the question would become how to create installer for Java app or bundle JRE together with Java app 然后问题将变成如何为Java应用程序创建安装程序或将Java与Java应用程序捆绑在一起

Whitelabel Error Page 白标错误页面

is just application error, not related to main question ("How to wrap executable .war with embedded tomcat into .exe?") 只是应用程序错误,与主要问题无关(“如何将带有嵌入式tomcat的可执行文件.war包装成.exe?”)

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

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