跳到主要内容
版本:5.0.1

云原生应用

DeepSeek V3 中英对照 Cloud Native Applications

备注

Spring Cloud 是在非限制性的 Apache 2.0 许可证下发布的。如果您想为本文档的此部分做出贡献,或者发现错误,可以在 github 上找到项目的源代码和问题跟踪器。

章节总结​

📄️CachedRandomPropertySource

Spring Cloud Context 提供了一个基于键缓存随机值的 PropertySource。除了缓存功能外,其工作方式与 Spring Boot 的 RandomValuePropertySource 相同。当您需要一个即使在 Spring 应用上下文重启后仍保持一致的随机值时,这个随机值可能很有用。属性值的格式为 cachedrandom.\[yourkey].\[type],其中 yourkey 是缓存中的键。type 值可以是 Spring Boot 的 RandomValuePropertySource 支持的任何类型。