57.3. Spring Boot Auto-Configuration

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

名称描述默认类型

camel.component.caffeine-loadcache.configuration.action

配置默认缓存操作。如果在消息标头中设置了操作,则来自标头的操作将优先使用。

 

字符串

camel.component.caffeine-loadcache.configuration.cache

配置一个已经使用实例化的缓存

 

Cache

camel.component.caffeine-loadcache.configuration.cache-loader

在 LoadCache 使用时配置 CacheLoader

 

CacheLoader

camel.component.caffeine-loadcache.configuration.create-cache-if-not-exist

配置如果缓存存在或者未预先配置,则需要创建缓存。

true

布尔值

camel.component.caffeine-loadcache.configuration.eviction-type

为此缓存设置驱除类型

 

EvictionType

camel.component.caffeine-loadcache.configuration.expire-after-access-time

在基于时间的驱除(以秒为单位)时,设置访问时间过期(以秒为单位)

300

整数

camel.component.caffeine-loadcache.configuration.expire-after-write-time

在基于时间的驱除(以秒为单位)设置访问后写入过期(以秒为单位)

300

整数

camel.component.caffeine-loadcache.configuration.initial-capacity

为缓存设置初始容量

10000

整数

camel.component.caffeine-loadcache.configuration.key

配置默认操作密钥。如果在消息标头中设置了密钥,则标头中的密钥优先使用。

 

对象

camel.component.caffeine-loadcache.configuration.key-type

缓存密钥类型,默认为 java.lang.Object

java.lang.Object

字符串

camel.component.caffeine-loadcache.configuration.maximum-size

为缓存设置最大大小

10000

整数

camel.component.caffeine-loadcache.configuration.removal-listener

为缓存设置特定的删除 Listener

 

RemovalListener

camel.component.caffeine-loadcache.configuration.stats-counter

为缓存统计设置特定的 Stats Counter

 

StatsCounter

camel.component.caffeine-loadcache.configuration.stats-enabled

在缓存中启用 stats

false

布尔值

camel.component.caffeine-loadcache.configuration.value-type

缓存值类型,默认为 java.lang.Object

java.lang.Object

字符串

camel.component.caffeine-loadcache.enabled

是否启用 caffeine-loadcache 组件自动配置。默认启用。

 

布尔值

camel.component.caffeine-loadcache.resolve-property-placeholders

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

true

布尔值