java - 如何将值从 application.yml 获取到 ehcache.xml?
问题描述
我在 application.yml 中有
TTL 值我想在 ehcache.xml 中使用 application.yml 中的这个 TTL 值
如何调用 application.yml 值
application.yml
reset:
servicebus:
system-name: ${ECP_CACHE_RESET_CONSUMER_NAME:}
notification-base-url: ${ECP_CACHE_RESET_BASEURL:}
topic-name: ${ECP_CACHE_RESET_TOPIC:}
cache-reset-time: 10000
ehcache.xml
<cache name="refDataCache" maxElementsInMemory="15000"
maxEntriesLocalDisk="20000" eternal="false"
timeToIdleSeconds="300" timeToLiveSeconds="720000" overflowToDisk="true"
memoryStoreEvictionPolicy="LFU" />
我想在 timeToLiveSeconds 中使用这个 ecache.xml 中的这个缓存重置时间值
解决方案
推荐阅读
- node.js - 如何在 babel-node 中包含一些 node_modules 包
- swift - 关闭插页式广告后呈现新的 ViewController - Swift 4
- css - ReactJS 中的 jsx 不使用 Css
- c# - 按名称选择一些元素?
- angular - 如何在 Angular 中恢复响应式表单语句?
- graphql - GraphQL - Prisma - 使用外部 API 的解析器
- powershell - CSV 的 PowerShell 输出未按正确顺序排列列
- c++ - 代码编译,但编译期间的“完成百分比”没有改变
- asp.net - 是否建议在我的 if 语句中包含多个条件?
- react-native - 背景图像上的透明按钮