我通过以下方式使用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代码失败。
答案 0 :(得分:0)
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