类 RandomValuePropertySource
java.lang.Object
org.springframework.core.env.PropertySource<Random>
org.springframework.boot.env.RandomValuePropertySource
PropertySource that returns a random value for any property that starts with
"random.". Where the "unqualified property name" is the portion of the
requested property name beyond the "random." prefix, this PropertySource
returns:
- When "int", a random
Integervalue, restricted by an optionally specified range. - When "long", a random
Longvalue, restricted by an optionally specified range. - When "uuid", a random
UUIDvalue. - Otherwise, a
byte[].
OPEN value (,max) CLOSE where the OPEN,CLOSE are any character and
value,max are integers. If max is not provided, then 0 is used as the
lower bound and value is the upper bound. If max is provided then
value is the minimum value and max is the maximum (exclusive).
- 从以下版本开始:
- 1.0.0
- 作者:
- Dave Syer, Matt Benson, Madhura Bhave, Moritz Halbritter
-
嵌套类概要
从类继承的嵌套类/接口 org.springframework.core.env.PropertySource
PropertySource.StubPropertySource -
字段概要
字段从类继承的字段 org.springframework.core.env.PropertySource
name, source -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidaddToEnvironment(ConfigurableEnvironment environment) getProperty(String name) 从类继承的方法 org.springframework.core.env.PropertySource
containsProperty, equals, getName, getSource, hashCode, named, toString
-
字段详细资料
-
RANDOM_PROPERTY_SOURCE_NAME
Name of the randomPropertySource.- 另请参阅:
-
-
构造器详细资料
-
RandomValuePropertySource
public RandomValuePropertySource() -
RandomValuePropertySource
-
-
方法详细资料
-
getProperty
- 指定者:
getProperty在类中PropertySource<Random>
-
addToEnvironment
-