mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-25 10:59:03 +00:00
Merge branch '1.3.x'
This commit is contained in:
+1
@@ -263,6 +263,7 @@ public class PropertiesConfigurationFactory<T>
|
||||
if (this.conversionService != null) {
|
||||
dataBinder.setConversionService(this.conversionService);
|
||||
}
|
||||
dataBinder.setAutoGrowCollectionLimit(Integer.MAX_VALUE);
|
||||
dataBinder.setIgnoreNestedProperties(this.ignoreNestedProperties);
|
||||
dataBinder.setIgnoreInvalidFields(this.ignoreInvalidFields);
|
||||
dataBinder.setIgnoreUnknownFields(this.ignoreUnknownFields);
|
||||
|
||||
+14
@@ -225,6 +225,20 @@ public class EnableConfigurationPropertiesTests {
|
||||
assertThat(this.context.getBean(TestProperties.class).getList()).hasSize(2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCollectionPropertiesBindingWithOver256Elements() {
|
||||
this.context.register(TestConfiguration.class);
|
||||
List<String> pairs = new ArrayList<String>();
|
||||
pairs.add("name:foo");
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
pairs.add("list[" + i + "]:" + i);
|
||||
}
|
||||
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.context,
|
||||
pairs.toArray(new String[] {}));
|
||||
this.context.refresh();
|
||||
assertThat(this.context.getBean(TestProperties.class).getList()).hasSize(1000);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPropertiesBindingWithoutAnnotation() {
|
||||
this.context.register(InvalidConfiguration.class);
|
||||
|
||||
Reference in New Issue
Block a user