diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/EnvironmentEndpointTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/EnvironmentEndpointTests.java index 6fc48feb69..3673de9acc 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/EnvironmentEndpointTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/EnvironmentEndpointTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2017 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. diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfiguration.java index 989ab6ed8c..726f4f8a50 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfiguration.java @@ -38,6 +38,7 @@ import org.springframework.web.reactive.DispatcherHandler; import org.springframework.web.reactive.function.server.HandlerStrategies; import org.springframework.web.reactive.function.server.RouterFunction; import org.springframework.web.reactive.function.server.RouterFunctions; +import org.springframework.web.reactive.function.server.ServerResponse; import org.springframework.web.reactive.result.view.ViewResolver; import org.springframework.web.server.WebFilter; import org.springframework.web.server.WebHandler; @@ -85,16 +86,16 @@ public class HttpHandlerAutoConfiguration { private final WebSessionManager webSessionManager; - private final List messageReaders; + private final List> messageReaders; - private final List messageWriters; + private final List> messageWriters; private final List viewResolvers; public FunctionalConfig(ObjectProvider> webFilters, ObjectProvider webSessionManager, - ObjectProvider> messageReaders, - ObjectProvider> messageWriters, + ObjectProvider>> messageReaders, + ObjectProvider>> messageWriters, ObjectProvider> viewResolvers) { this.webFilters = webFilters.getIfAvailable(); if (this.webFilters != null) { @@ -107,9 +108,10 @@ public class HttpHandlerAutoConfiguration { } @Bean - public HttpHandler httpHandler(List routerFunctions) { + public HttpHandler httpHandler( + List> routerFunctions) { routerFunctions.sort(new AnnotationAwareOrderComparator()); - RouterFunction routerFunction = routerFunctions.stream() + RouterFunction routerFunction = routerFunctions.stream() .reduce(RouterFunction::and).get(); HandlerStrategies.Builder strategiesBuilder = HandlerStrategies.builder(); if (this.messageReaders != null) { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfigurationTests.java index 5e1e262581..7eb1fabc2d 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfigurationTests.java @@ -252,7 +252,7 @@ public class ResourceServerTokenServicesConfigurationTests { EnvironmentTestUtils.addEnvironment(this.environment, "security.oauth2.resource.jwt.key-uri=http://localhost:12345/banana"); this.context = new SpringApplicationBuilder(ResourceConfiguration.class) - .environment(this.environment).web(false).run(); + .environment(this.environment).web(WebApplicationType.NONE).run(); assertThat(this.context.getBeansOfType(JwtAccessTokenConverter.class)).hasSize(1); } @@ -262,7 +262,7 @@ public class ResourceServerTokenServicesConfigurationTests { "security.oauth2.resource.jwt.key-uri=http://localhost:12345/banana"); this.context = new SpringApplicationBuilder(ResourceConfiguration.class, JwtAccessTokenConverterRestTemplateCustomizerConfiguration.class) - .environment(this.environment).web(false).run(); + .environment(this.environment).web(WebApplicationType.NONE).run(); JwtAccessTokenConverterRestTemplateCustomizer customizer = this.context .getBean(JwtAccessTokenConverterRestTemplateCustomizer.class); verify(customizer).customize(any(RestTemplate.class)); diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfigurationTests.java index 90924d71e7..3102c6dc38 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfigurationTests.java @@ -31,6 +31,7 @@ import org.springframework.http.server.reactive.HttpHandler; import org.springframework.web.reactive.function.server.RequestPredicates; import org.springframework.web.reactive.function.server.RouterFunction; import org.springframework.web.reactive.function.server.RouterFunctions; +import org.springframework.web.reactive.function.server.ServerResponse; import org.springframework.web.server.WebFilter; import org.springframework.web.server.WebHandler; import org.springframework.web.server.handler.FilteringWebHandler; @@ -149,9 +150,9 @@ public class HttpHandlerAutoConfigurationTests { protected static class FunctionalConfig { @Bean - public RouterFunction routerFunction() { + public RouterFunction routerFunction() { return RouterFunctions.route(RequestPredicates.GET("/test"), - serverRequest -> null); + (serverRequest) -> null); } } @@ -160,9 +161,9 @@ public class HttpHandlerAutoConfigurationTests { protected static class FunctionalConfigWithWebFilters { @Bean - public RouterFunction routerFunction() { + public RouterFunction routerFunction() { return RouterFunctions.route(RequestPredicates.GET("/test"), - serverRequest -> null); + (serverRequest) -> null); } @Bean @@ -181,9 +182,9 @@ public class HttpHandlerAutoConfigurationTests { } @Bean - public RouterFunction routerFunction() { + public RouterFunction routerFunction() { return RouterFunctions.route(RequestPredicates.GET("/test"), - serverRequest -> null); + (serverRequest) -> null); } } diff --git a/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/InstallTests.java b/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/InstallTests.java index a787570b23..344edb7922 100644 --- a/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/InstallTests.java +++ b/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/InstallTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2015 the original author or authors. + * Copyright 2012-2017 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. diff --git a/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/ProjectCreator.java b/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/ProjectCreator.java index 3b6038f37a..8e08921d37 100644 --- a/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/ProjectCreator.java +++ b/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/ProjectCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2017 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.