7.3.2. 配置部署扫描器
部署扫描程序可以使用管理控制台或管理 CLI 进行配置。您可以配置部署扫描器的行为,如扫描间隔、部署文件夹位置和自动部署特定应用文件类型。您还可以完全禁用部署扫描程序。
有关所有可用部署扫描器属性的详情,请参阅 Deployment Scanner Attributes 部分。
使用以下管理 CLI 命令配置默认部署扫描程序:
禁用 Deployment Scanner
/subsystem=deployment-scanner/scanner=default:write-attribute(name=scan-enabled,value=false)
这将禁用 默认的
部署扫描程序。
更改扫描间隔
/subsystem=deployment-scanner/scanner=default:write-attribute(name=scan-interval,value=10000)
这会将扫描间隔时间从 5000
毫秒(五秒)更新为 10000
毫秒(十秒)。
更改 Deployment Folder
/subsystem=deployment-scanner/scanner=default:write-attribute(name=path,value=/path/to/deployments)
这会将部署文件夹的位置从 EAP_HOME/standalone/deployments
的默认位置更改为 /path/to/deployments
。
除非指定了 relative-to
属性,否则路径 值
将被视为绝对路径,在这种情况下,它将相对于该路径。
启用自动部署展开的内容
/subsystem=deployment-scanner/scanner=default:write-attribute(name=auto-deploy-exploded,value=true)
这可实现自动部署展开式内容,这在默认情况下是禁用的。
禁用 Zipped 内容的自动部署
/subsystem=deployment-scanner/scanner=default:write-attribute(name=auto-deploy-zipped,value=false)
这会禁用默认启用的 zipped 内容的自动部署。
禁用 XML 内容的自动部署
/subsystem=deployment-scanner/scanner=default:write-attribute(name=auto-deploy-xml,value=false)
这禁用了 XML 内容的自动部署,默认为启用。