Fix binding random properties test

See gh-26201
This commit is contained in:
Phillip Webb 2021-04-26 17:36:58 -07:00
parent ba5b36d733
commit 1e0a3a946d

View File

@ -1067,7 +1067,7 @@ class ConfigurationPropertiesTests {
MutablePropertySources sources = this.context.getEnvironment().getPropertySources();
sources.addFirst(new RandomValuePropertySource());
Map<String, Object> source = new HashMap<>();
source.put("com.example.bar", "${random.int}");
source.put("com.example.bar", "${random.int[100,200]}");
sources.addLast(new MapPropertySource("test", source));
load(SimplePrefixedProperties.class);
SimplePrefixedProperties bean = this.context.getBean(SimplePrefixedProperties.class);