mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix binding random properties test
See gh-26201
This commit is contained in:
parent
ba5b36d733
commit
1e0a3a946d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user