java - Infinispan 配置 XML 中的变量替换
问题描述
我有一个使用 infinispan 进行缓存的 jboss wildfly 应用程序服务器。我目前正在迁移配置文件,我有点卡住了。在旧版本的 jboss 中,cache-config.xml 可以使用模板样式变量替换( ${foo}/dir )。在 wildfly 中使用相同的技术似乎不起作用。我最终得到了名为“${foo}/dir”而不是“foo/dir”的文件夹。我需要能够为生产和测试构建更改这些变量,因此硬编码它们将不起作用。有谁知道如何在 wildfly 应用程序中处理这个问题?
作为参考,这是我的 cache-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns="urn:infinispan:config:9.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:infinispan:config:9.0
http://www.infinispan.org/schemas/infinispan-config-9.0.xsd">
<cache-container name="product-cache" default-cache="local">
<jmx domain="com.tura.product"/>
<local-cache name="local">
<locking isolation="REPEATABLE_READ" acquire-timeout="15000" striping="false" concurrency-level="1000"/>
<transaction mode="BATCH" />
<persistence passivation="true">
<file-store fetch-state="true" purge="true">
<property name="location">${jboss.server.data.dir}${/}product</property>
</file-store>
</persistence>
<!-- enable lazy deserialization -->
<memory>
<binary />
</memory>
</local-cache>
</cache-container>
</infinispan>
解决方案
推荐阅读
- html - 鼠标移出后的悬停效果
- python - 如何在 Django 中添加多个文件
- php - Wordpress 迁移导致无限重定向循环
- reactjs - React JS - JEST - TypeError:无法读取未定义的属性“承诺”
- python - 为什么队列关闭后多处理 Queue.get() 会阻塞?
- python - 如何在python中计算分布的百分位数
- django - 绕过 django-rest-framework APIExceptions
- scheme - 我将如何编写一个接收树(表示为列表)并返回其元素基本上颠倒的列表的 Scheme 过程?
- c# - 使用 itextsharp 添加到 PDF 后图像质量不佳
- ruby-on-rails - Active Storage 无法将图像解析为 URL 错误