Wildfly、WAR 和虚拟主机

Wildfly, WAR and virtual hosts

目前我遇到以下情况的问题:

  1. 在 Wildfly 中,虚拟主机在 standalone.xml 文件中定义。
  2. 要将已部署的 .war-Artifact 绑定到虚拟主机,虚拟主机将放置在 .war-Artifact 的 jboss-web.xml 中。

这导致 .war-Artifacts 依赖于当前 (Wildfly) 环境才能工作,因此不可交换,例如存储在像 Artifactory 这样的神器商店中。

有没有办法解决这个问题,甚至假设 1 and/or 2 一开始就错了?

显然我不知道有一种方法可以在某些部署描述符中使用占位符:

jboss-descriptor-property-replacement is used to enable or disable property replacement in the following descriptors:

jboss-ejb3.xml
jboss-app.xml
jboss-web.xml
*-jms.xml
*-ds.xml 

分别

spec-descriptor-property-replacement is used to enable or disable property replacement in the following descriptors:

ejb-jar.xml
persistence.xml 

(https://access.redhat.com/documentation/en-us/jboss_enterprise_application_platform/6.2/html/security_guide/enablingdisabling_descriptor_based_property_replacement1)