|
This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Cloud Commons 4.3.0! |
CachedRandomPropertySource
Spring Cloud Context provides a PropertySource that caches random values based on a key. Outside of the caching
functionality it works the same as Spring Boot’s RandomValuePropertySource.
This random value might be useful in the case where you want a random value that is consistent even after the Spring Application
context restarts. The property value takes the form of cachedrandom.[yourkey].[type] where yourkey is the key in the cache. The type value can
be any type supported by Spring Boot’s RandomValuePropertySource.
myrandom=${cachedrandom.appname.value}