91.3. Spring Boot Auto-Configuration
组件支持 25 个选项,如下所示。
| 名称 | 描述 | 默认 | 类型 |
|---|---|---|---|
| camel.component.ehcache.cache-configuration | 用于创建缓存的默认缓存配置。选项为 org.ehcache.config.CacheConfiguration<,?> 类型。 | 字符串 | |
| camel.component.ehcache.cache-configuration-uri | 指向 Ehcache XML 配置文件位置的 URI | 字符串 | |
| camel.component.ehcache.cache-manager | 缓存管理器。选项是一个 org.ehcache.CacheManager 类型。 | 字符串 | |
| camel.component.ehcache.cache-manager-configuration | 缓存管理器配置。选项是一个 org.ehcache.config.Configuration 类型。 | 字符串 | |
| camel.component.ehcache.caches-configurations | 用于创建缓存的缓存配置映射。 | map | |
| camel.component.ehcache.configuration.action | 配置默认缓存操作。如果在消息标头中设置了操作,则来自标头的操作将优先使用。 | 字符串 | |
| camel.component.ehcache.configuration.cache-manager | 缓存管理器 | CacheManager | |
| camel.component.ehcache.configuration.cache-manager-configuration | 缓存管理器配置 | 配置 | |
| camel.component.ehcache.configuration.configuration | 用于创建缓存的默认缓存配置。 | CacheConfiguration | |
| camel.component.ehcache.configuration.configuration-uri | 指向 Ehcache XML 配置文件位置的 URI | 字符串 | |
| camel.component.ehcache.configuration.configurations | 用于创建缓存的缓存配置映射。 | map | |
| camel.component.ehcache.configuration.create-cache-if-not-exist | 配置如果缓存存在或者未预先配置,则需要创建缓存。 | true | 布尔值 |
| camel.component.ehcache.configuration.event-firing | 设置交付模式(同步、异步) | EventFiring | |
| camel.component.ehcache.configuration.event-ordering | 设置交付模式(排序、未排序) | EventOrdering | |
| camel.component.ehcache.configuration.event-types | 设置要侦听的事件类型 | Set | |
| camel.component.ehcache.configuration.key | 配置默认操作密钥。如果在消息标头中设置了密钥,则标头中的密钥优先使用。 | 对象 | |
| camel.component.ehcache.configuration.key-type | 缓存密钥类型,默认为 java.lang.Object | java.lang.Object | 字符串 |
| camel.component.ehcache.configuration.value-type | 缓存值类型,默认为 java.lang.Object | java.lang.Object | 字符串 |
| camel.component.ehcache.customizer.cache-configuration.enabled | 启用或禁用 cache-configuration 自定义器。 | true | 布尔值 |
| camel.component.ehcache.customizer.cache-configuration.mode | 配置是否已添加缓存配置,或者它们必须替换已经在组件上配置的那些配置。 | CacheConfiguration CustomizerConfiguration$ Mode | |
| camel.component.ehcache.customizer.cache-manager.enabled | 启用或禁用 cache-manager 自定义器。 | true | 布尔值 |
| camel.component.ehcache.customizer.cache-manager.override | 如果组件上最终设置缓存管理器,配置 则由自定义器覆盖。 | false | 布尔值 |
| camel.component.ehcache.enabled | 启用 ehcache 组件 | true | 布尔值 |
| camel.component.ehcache.resolve-property-placeholders | 启动时,组件是否应自行解析属性占位符。只有 String 类型的属性才能使用属性占位符。 | true | 布尔值 |
| camel.component.ehcache.configuration.config-uri | 指向 Ehcache XML 配置文件的位置 @deprecated 的 URI 使用 {@link #setConfigurationUri (String)} 替代 | 字符串 |
91.3.1. 消息标头 Camel 复制链接链接已复制到粘贴板!
| 标头 | 类型 | 描述 |
|---|---|---|
| CamelEhcacheAction |
| 要在缓存中处理的操作,有效的选项有: * CLEAR * PUT * PUT_ALL * PUT_IF_ABSENT * GET * GET_ALL * REMOVE * REMOVE_ALL * REPLACE |
| CamelEhcacheActionHasResult | 布尔值 | 如果操作结果为 true,则设置为 true |
| CamelEhcacheActionSucceeded |
| 如果操作被设置,则设置为 true |
| CamelEhcacheKey | 对象 | 用于操作的缓存密钥 |
| CamelEhcacheKeys | Set<Object> | 中使用的键列表 * PUT_ALL * GET_ALL * REMOVE_ALL |
| CamelEhcacheValue | 对象 | 放入缓存或操作结果的值 |
| CamelEhcacheOldValue | 对象 | 与 PUT_IF_ABSENT 等操作相关的旧值,或用于比较操作的对象(如 REPLACE) |
| CamelEhcacheEventType | EventType | 接收的事件类型 |