Merge branch '1.5.x'
This commit is contained in:
@@ -267,6 +267,8 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
||||
"java.util.Collection<java.lang.Byte>"));
|
||||
assertThat(metadata).has(Metadata.withProperty("collection.doubles",
|
||||
"java.util.List<java.lang.Double>"));
|
||||
assertThat(metadata).has(Metadata.withProperty("collection.names-to-holders",
|
||||
"java.util.Map<java.lang.String,org.springframework.boot.configurationsample.simple.SimpleCollectionProperties.Holder<java.lang.String>>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -45,6 +45,8 @@ public class SimpleCollectionProperties {
|
||||
|
||||
private final List<Double> doubles = new ArrayList<>();
|
||||
|
||||
private final Map<String, Holder<String>> namesToHolders = new HashMap<>();
|
||||
|
||||
public Map<Integer, String> getIntegersToNames() {
|
||||
return this.integersToNames;
|
||||
}
|
||||
@@ -81,4 +83,18 @@ public class SimpleCollectionProperties {
|
||||
return this.doubles;
|
||||
}
|
||||
|
||||
public Map<String, Holder<String>> getNamesToHolders() {
|
||||
return this.namesToHolders;
|
||||
}
|
||||
|
||||
public static class Holder<T> {
|
||||
|
||||
private T target;
|
||||
|
||||
public void setTarget(T target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user