Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/377.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在Tomcat服务器上启动JHipster生成的应用程序_Java_Spring_Jndi_Jhipster_Tomcat8 - Fatal编程技术网

Java 在Tomcat服务器上启动JHipster生成的应用程序

Java 在Tomcat服务器上启动JHipster生成的应用程序,java,spring,jndi,jhipster,tomcat8,Java,Spring,Jndi,Jhipster,Tomcat8,我使用JHipster制作了web应用程序。一切正常,但当我将其移动到tomcat/webapps并部署时,我出现了一些错误。出现错误后,我的应用程序运行正常,所以我之前没有关注这一点。。。但现在,当我试图在linux服务器上部署它时,我的应用程序出现了几个错误“CreateBeanException”。我认为出现这个错误是因为我忽略了(在windows和linux中)他的文件中的tomcat配置。有人能帮我吗? 我在生产中使用mysql 这是tomcat.exe的日志 这是来自tomcat/

我使用JHipster制作了web应用程序。一切正常,但当我将其移动到tomcat/webapps并部署时,我出现了一些错误。出现错误后,我的应用程序运行正常,所以我之前没有关注这一点。。。但现在,当我试图在linux服务器上部署它时,我的应用程序出现了几个错误“CreateBeanException”。我认为出现这个错误是因为我忽略了(在windows和linux中)他的文件中的tomcat配置。有人能帮我吗? 我在生产中使用mysql

这是tomcat.exe的日志

这是来自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>

WEB-INF/WEB.xml
${catalina.base}/conf/web.xml
我应该粘贴什么? 在windows和linux上安装后,我有默认配置。 我希望有人能帮助我。
谢谢

您是否有任何特殊需要将其部署到tomcat上? 因为

JHipster
是一个完全开源、广泛使用的应用程序生成器。轻松创建高品质的弹簧靴+角度项目

Spring Boot为您提供了一个嵌入式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
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
在没有应用服务器的情况下执行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
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

有关更多信息,请参见本伟大的文档,您是否有任何特殊需要将其部署到tomcat上? 因为

JHipster
是一个完全开源、广泛使用的应用程序生成器。轻松创建高品质的弹簧靴+角度项目

Spring Boot为您提供了一个嵌入式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
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
在没有应用服务器的情况下执行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
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

欲了解更多信息,请参见本伟大的文档

Hi@Edmond。机器重新启动后是否可能执行此操作。/jhipster-0.0.1-SNAPSHOT.war继续运行?或者在这种情况下,我必须使用Tomcat?@inêsGomes这看起来像是一个新问题,这是一个标准问题。在服务器启动后启动java应用程序。这取决于你使用的是什么,很简单。谢谢@Edmond。像这样的吗?是的,是的。这是java app.Hi@Edmond的启动脚本的一个很好的例子。机器重新启动后是否可能执行此操作。/jhipster-0.0.1-SNAPSHOT.war继续运行?或者在这种情况下,我必须使用Tomcat?@inêsGomes这看起来像是一个新问题,这是一个标准问题。在服务器启动后启动java应用程序。这取决于你使用的是什么,很简单。谢谢@Edmond。像这样的吗?是的,是的。这是java应用程序启动脚本的一个好例子。