我有 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/