56.3. Spring Boot Auto-Configuration


组件支持 17 个选项,如下所列。

Expand
Name描述默认值类型

camel.component.cache.cache-manager-factory

使用给定的 CacheManagerFactory 创建 CacheManager。默认情况下,使用 DefaultCacheManagerFactory。选项是 org.apache.camel.component.cache.CacheManagerFactory 类型。

 

字符串

camel.component.cache.configuration-file

设置从 classpath 或文件系统加载的 ehcache.xml 文件的位置。默认情况下,该文件从 classpath:ehcache.xml 加载

classpath:ehcache.xml

字符串

camel.component.cache.configuration.cache-loader-registry

使用 CacheLoaderRegistry 配置缓存加载程序

 

CacheLoaderRegistry

camel.component.cache.configuration.cache-name

缓存的名称

 

字符串

camel.component.cache.configuration.disk-expiry-thread-interval-seconds

运行磁盘到期线程之间的秒数。

 

Long

camel.component.cache.configuration.disk-persistent

磁盘存储是否在应用程序重启之间保留。

false

布尔值

camel.component.cache.configuration.eternal

设置元素是否是 eternal。如果忽略了超时,则元素永远不会过期。

false

布尔值

camel.component.cache.configuration.event-listener-registry

使用 CacheEventListenerRegistry 配置事件监听程序

 

CacheEventListener Registry

camel.component.cache.configuration.max-elements-in-memory

内存中可以在定义的缓存中存储的元素数。

1000

整数

camel.component.cache.configuration.memory-store-eviction-policy

达到内存中的最大元素数时要使用的驱除策略。策略定义要删除哪些元素。LRU - 最近使用的 LFU - Lest Frequently Used FIFO - 首次退出

 

MemoryStoreEviction 策略

camel.component.cache.configuration.object-cache

是否启用允许将不可序列化对象存储在缓存中。如果启用了这个选项,则无法启用到磁盘的溢出。

false

布尔值

camel.component.cache.configuration.overflow-to-disk

指定缓存是否可能会给磁盘溢出

true

布尔值

camel.component.cache.configuration.time-to-idle-seconds

在元素过期前访问的最大时间

300

Long

camel.component.cache.configuration.time-to-live-seconds

创建时间和元素到期之间的最长时间。仅在元素不是 eternal 时使用

300

Long

camel.component.cache.enabled

启用缓存组件

true

布尔值

camel.component.cache.resolve-property-placeholders

启动时组件是否应解析自身上的属性占位符。只有属于 String 类型的属性才能使用属性占位符。

true

布尔值

camel.component.cache.configuration.disk-store-path

这个参数会被忽略。CacheManager 使用 setter injection 进行设置。

 

字符串

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat