jakarta-ee - Wildfly、WAR 和虚拟主机

标签 jakarta-ee jboss wildfly war virtualhost

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

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

这导致 .war-Artifacts 依赖于当前(Wildfly)环境来工作,因此不可交换,例如存储在 Artifactory 等工件存储中。

有没有办法解决这个问题,或者假设 1 和/或 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 )

关于jakarta-ee - Wildfly、WAR 和虚拟主机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48302973/

相关文章:

java - 如何让 GWT 编译多个模块?

java - 从 git 创建然后部署 war

java - OpenShift:Wildfly占用了1G大部分空间,怎么办?

java - 如何创建 EJB 3.2 Stateless Bean 项目并在 Wildfly 8 上运行它?

java - Tomcat 上的 Web 应用程序

jboss - 使用 JDK 1.8 启动 Wildfly 8.0 服务器时出错

javascript - ajax post to jboss eap 7 without encodeURIComponent occurred messy code

java - 从 Java 触发 shell 脚本的最佳方法

maven-2 - Maven忽略提供的范围

java - 默认情况下 session 持续多长时间?