java - 如何通过部署他们的 war 从 Tomcat 在本地运行多个依赖应用程序?

标签 java tomcat grails deployment war

我有 4 个 Grails 和 Java 应用程序的 4 个 war 文件,我想将它们部署在本地的 Apache Tomcat 9 上。如果其中一个应用程序需要先运行,然后再运行其他应用程序,我应该如何部署它们?目前我在tomcat目录中创建了4个文件夹并粘贴了各自的 war 。当我启动 tomcat 时,它会一个接一个地选择部署,但我不知道它是否应该按顺序选择它们以进行正确部署,因为我在日志中遇到错误。我应该如何部署它们?

SEVERE [localhost-startStop-1] 

org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException: Cannot invoke method getAt() on null object

日志中的另一个

[localhost-startStop-1] 

org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file 03-Jan-2017 01:11:04.950 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/(app name)] startup failed due to previous errors

最佳答案

使用 Jenkins 的 DevOps 方法可能会解决您的问题。

您可以使用 FreeStyle 作业以规定的顺序构建和/或部署您的应用程序。我们在 AWS 的 CI/CD 环境中定期执行代码提交。

没有理由这也不能在非 AWS 环境中完成。

关于java - 如何通过部署他们的 war 从 Tomcat 在本地运行多个依赖应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41437817/

相关文章:

java - 包含静态成员的类实例的垃圾回收

java - Android Studio抛出 "image not found"异常

spring - 集成spring项目

grails - Grails 3.0.1 Spring Security Core返回Gradle构建因错误而终止:编译失败

java - 从文本文件中包含的路径显示图像

java - 工厂方法模式—— 'Creator'类应该什么时候实现工厂方法?

Tomcat 8 更改配置和 Webapp 文件夹

http - 在浏览器中点击刷新时缓存控件不起作用

sorting - 如何对grails对象的persistentSet进行排序?

grails - 我怎样才能有一个提交按钮(grails)来更新一个特定的目标框架?