Kar*_*ski 1 java spring jndi tomcat8 jhipster
我使用 JHipster 制作了 Web 应用程序。一切正常,但是当我将它移动到 tomcat/webapps 并部署它时,我遇到了一些错误。出错后,我的应用程序运行正常,所以我之前没有关注这个......但是现在当我尝试将它部署到 linux 服务器上时,我的应用程序开始出现几个错误“CreateBeanException”。我认为出现这个错误是因为我忽略了(在 windows 和 linux 中)他文件中的 tomcat 配置。有人可以帮我吗?我在生产中使用 mysql。
这是来自 tomcat.exe https://pastebin.com/LA12tiL9的日志
这是我来自 tomcat/conf 的 context.xml
<?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>
Run Code Online (Sandbox Code Playgroud)
我应该粘贴什么?在 windows 和 linux 上安装后,我有默认配置。我希望有人可以帮助我。谢谢
你有什么特别的需求想在tomcat上部署吗?因为
JHipster是一个完全开源的、广泛使用的应用程序生成器。轻松打造优质Spring Boot + Angular 项目!
和春季启动给你一个嵌入式Web服务器,您可以使用开箱即用。
因此,您可以轻松使用 JHipster -> Spring Boot: 提供以下 JHipster 步骤的嵌入式 Web 服务器:
生成 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
Run Code Online (Sandbox Code Playgroud)
在没有应用服务器的情况下执行 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
Run Code Online (Sandbox Code Playgroud)
有关更多信息,请遵循JHipster 的这份很棒的文档
| 归档时间: |
|
| 查看次数: |
4919 次 |
| 最近记录: |