mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '1.4.x' into 1.5.x
This commit is contained in:
commit
22e456a177
@ -41,7 +41,7 @@ public abstract class AbstractEndpointHandlerMappingTests {
|
||||
public void pathNotMappedWhenGetPathReturnsNull() throws Exception {
|
||||
TestMvcEndpoint endpoint = new TestMvcEndpoint(new TestEndpoint("a"));
|
||||
TestActionEndpoint other = new TestActionEndpoint(new TestEndpoint("b"));
|
||||
AbstractEndpointHandlerMapping mapping = new TestEndpointHandlerMapping(
|
||||
AbstractEndpointHandlerMapping<?> mapping = new TestEndpointHandlerMapping<MvcEndpoint>(
|
||||
Arrays.asList(endpoint, other));
|
||||
mapping.setApplicationContext(this.context);
|
||||
mapping.afterPropertiesSet();
|
||||
@ -89,9 +89,10 @@ public abstract class AbstractEndpointHandlerMappingTests {
|
||||
|
||||
}
|
||||
|
||||
private static class TestEndpointHandlerMapping extends AbstractEndpointHandlerMapping {
|
||||
private static class TestEndpointHandlerMapping<E extends MvcEndpoint>
|
||||
extends AbstractEndpointHandlerMapping<E> {
|
||||
|
||||
TestEndpointHandlerMapping(Collection<? extends MvcEndpoint> endpoints) {
|
||||
TestEndpointHandlerMapping(Collection<E> endpoints) {
|
||||
super(endpoints);
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@ import org.springframework.boot.configurationsample.NestedConfigurationProperty;
|
||||
/**
|
||||
* Demonstrate that only relevant generics are stored in the metadata.
|
||||
*
|
||||
* @param <T> the type of the config
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@ConfigurationProperties("generic")
|
||||
@ -43,11 +44,9 @@ public class GenericConfig<T> {
|
||||
@NestedConfigurationProperty
|
||||
private final Bar<String> bar = new Bar<String>();
|
||||
|
||||
private final Map<String, Bar<Integer>> stringToBar =
|
||||
new HashMap<String, Bar<Integer>>();
|
||||
private final Map<String, Bar<Integer>> stringToBar = new HashMap<String, Bar<Integer>>();
|
||||
|
||||
private final Map<String, Integer> stringToInteger =
|
||||
new HashMap<String, Integer>();
|
||||
private final Map<String, Integer> stringToInteger = new HashMap<String, Integer>();
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
|
Loading…
Reference in New Issue
Block a user