I made web application using JHipster. Everything working correctly but when I move it to tomcat/webapps and deploy it I have some errors. After errors, my app runs correctly, so I wasn't focused on this earlier... But now when I'm trying to deploy it on linux server my app starts with several errors "CreateBeanException". I think that this errors appears because I ignored(in windows and linux) tomcat configuration in his files. Can anybody help me with it ? I'm using mysql on production.
Here is the log from tomcat.exe https://pastebin.com/LA12tiL9
Here is my context.xml from tomcat/conf
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
</Context>
What I should paste yet? I have default configs after install it on windows and linux. I hope somebody can help me. Thanks
答案 0 :(得分:4)
您是否有任何需要在tomcat上部署它的特殊需求? 因为
JHipster
是一个完全开源,广泛使用的应用程序生成器。轻松创建高质量的 Spring Boot + Angular项目!
Spring Boot 为您提供了一个开箱即用的嵌入式Web服务器。
因此,您可以轻松使用JHipster的嵌入式Web服务器 - &gt; Spring Boot:提供以下JHipster步骤:
生成WAR文件
To package the application as a “production” WAR, type:
./mvnw -Pprod package
Or when using Gradle:
./gradlew -Pprod bootRepackage
This will generate two files (if your application is called “jhipster”):
target/jhipster-0.0.1-SNAPSHOT.war
target/jhipster-0.0.1-SNAPSHOT.war.original
在没有应用程序服务器的情况下执行WAR文件
Instead of deploying to an application server, many people find it easier to just have an exectuable WAR file.
The first WAR file generated in the previous step is such a WAR, so you can run it in “production” mode by typing (on Mac OS X or Linux):
./jhipster-0.0.1-SNAPSHOT.war
If you are on Windows, use:
java -jar jhipster-0.0.1-SNAPSHOT.war
有关详细信息,请参阅JHipster
后的这篇精彩文档