【问题标题】:Control order of WAR file deployment in JBoss EAP 7.2.0JBoss EAP 7.2.0 中 WAR 文件部署的控制顺序
【发布时间】:2020-06-04 19:01:40
【问题描述】:

我开发了两个 Spring Boot 应用程序,一个是 Cloud Config Server,另一个是从 Config Server 获取属性的 Spring Boot 应用程序。我已经将这两个应用程序部署为 JBoss EAP 中的 WAR 文件。我按顺序部署 WAR 文件,在其他应用程序之前部署配置服务器。重启服务器后出现问题,第二个war文件在配置服务器的war文件之前部署。

我是 Jboss EAP 7.2.0,我将如何确保 Config Server 的 WAR 文件始终部署在其他应用程序的 WAR 文件之前?

【问题讨论】:

    标签: spring-boot java-8 jboss-eap-7


    【解决方案1】:

    您可以通过使用 jboss-all.xml 部署描述符来声明部署之间的依赖关系来控制部署的启动顺序。

    示例: 如果你想在bar.ear 之前部署foo.ear,那么你可以像这样创建一个bar.ear/META-INF/jboss-all.xml 文件:

    <jboss xmlns="urn:jboss:1.0">
       <jboss-deployment-dependencies xmlns="urn:jboss:deployment-dependencies:1.0">
         <dependency name="foo.ear" />
       </jboss-deployment-dependencies>
    </jboss>
    

    [1]https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.1/html/configuration_guide/deploying_applications#control_order_deployments

    [2]https://access.redhat.com/solutions/88763

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-18
      • 2018-09-13
      • 2017-03-06
      • 2020-01-05
      • 1970-01-01
      • 1970-01-01
      • 2018-11-26
      • 2019-03-02
      相关资源
      最近更新 更多