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

设置 ehcache.xml 文件的位置,以便从 classpath 或文件系统加载。默认情况下,该文件从 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 - 最低频率使用 FIFO - 优先选择第一出

 

MemoryStoreEviction Policy

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 注入来设置它。

 

字符串

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

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

让开源更具包容性

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

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部