如何在WildFly中使用单个HTTP管理API查询取消部署多个WAR?

问题描述 投票:0回答:1

我使用Wildfly 10的HTTP管理API以下列方式取消部署WAR:

curl --digest -u admin:admin -L -H 'Content-Type: application/json'        \
      -d '{"address":[{"deployment":"my-war.war"}],"operation":"remove"}'  \
      http://localhost:9990/management

如何使用一个Wildfly HTTP管理API请求取消部署多个WAR?

我在官方文档中找不到解决方案:https://docs.jboss.org/author/WFLY10/The+HTTP+management+API https://docs.jboss.org/author/WFLY10/Application+deployment

我正在寻找可以取消部署多个WAR的JSON。我已尝试过使用JSON数组的一些方法,但无济于事。其中一些导致500 - 内部服务器错误,其他导致WFLYCTL0030代码失败。

http wildfly war wildfly-10 undeploy
1个回答
0
投票

发现它在EAP 6.4 documentation

curl --digest -L -D - http://localhost:9990/management --header "Content-Type: application/json" -d '
{
   "operation":"composite",
   "address":[  
   ],
   "steps":[
      {
         "operation":"undeploy",
         "address":{
            "deployment":"my-war.war"
         }
      },
      {
         "operation":"remove",
         "address":{
            "deployment":"my-war.war"
         }
      },
      {
         "operation":"undeploy",
         "address":{  
            "deployment":"my-second-war.war"
         }
      },
      {
         "operation":"remove",
         "address":{
            "deployment":"my-second-war.war"
         }
      }
   ],
   "json.pretty":1
}' -u admin:admin
© www.soinside.com 2019 - 2024. All rights reserved.