public class RandomValuePropertySource extends org.springframework.core.env.PropertySource<Random>
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:
Integer
value, restricted by an optionally
specified range.Long
value, restricted by an optionally
specified range.byte[]
.
OPEN value (,max) CLOSE
where the OPEN,CLOSE
are any character and
value,max
are integers. If max
is provided then value
is the
minimum value and max
is the maximum (exclusive).
Modifier and Type | Field and Description |
---|---|
static String |
RANDOM_PROPERTY_SOURCE_NAME
Name of the random
PropertySource . |
Constructor and Description |
---|
RandomValuePropertySource() |
RandomValuePropertySource(String name) |
Modifier and Type | Method and Description |
---|---|
static void |
addToEnvironment(org.springframework.core.env.ConfigurableEnvironment environment) |
Object |
getProperty(String name) |
public static final String RANDOM_PROPERTY_SOURCE_NAME
PropertySource
.public RandomValuePropertySource(String name)
public RandomValuePropertySource()
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.