在 WAR 上使用 :read-resource-description 您会看到:
"enabled" => {
"type" => BOOLEAN,
"description" => "Boolean indicating whether the deployment content is currently deployed in the runtime (or should be deployed in the runtime the next time the server starts.)",
"expressions-allowed" => false,
"nillable" => true,
"default" => false,
"access-type" => "read-only",
"storage" => "configuration"
},
由于 access-type=read-only 你得到错误。你有另一个领域:
"status" => {
"type" => STRING,
"description" => "The current runtime status of a deployment. Possible status modes are OK, FAILED, and STOPPED. FAILED indicates a dependency is missing or a service could not start. STOPPED indicates that the deployment was not enabled or was manually stopped.",
所以我猜你想要的是你的 WAR 已经启用=false 和 status=STOPPED 并且你的 WAR 没有被删除。您可以通过以下方式之一获得此信息:
:read-operation-names
{
"outcome" => "success",
"result" => [
"add",
"deploy",
"read-attribute",
"read-children-names",
"read-children-resources",
"read-children-types",
"read-operation-description",
"read-operation-names",
"read-resource",
"read-resource-description",
"redeploy",
"remove",
"undefine-attribute",
"undeploy",
"whoami",
"write-attribute"
]
}
在这种情况下,您使用 :undeploy 禁用应用程序并使用 :deploy 启用它。这就是网络控制台的作用。