diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/Token.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/Token.java index 75c7f2bf18..6c28f6d788 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/Token.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/Token.java @@ -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. diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/mappings/package-info.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/mappings/package-info.java index d83205e6c4..167f87dd21 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/mappings/package-info.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/mappings/package-info.java @@ -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. diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/scheduling/ScheduledTasksEndpointTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/scheduling/ScheduledTasksEndpointTests.java index 66439adc26..e57183bd6b 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/scheduling/ScheduledTasksEndpointTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/scheduling/ScheduledTasksEndpointTests.java @@ -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,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class ScheduledTasksEndpointTests { - private final ApplicationContextRunner runner = new ApplicationContextRunner() + private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() .withUserConfiguration(BaseConfiguration.class); @Test @@ -137,7 +137,7 @@ public class ScheduledTasksEndpointTests { } private void run(Class configuration, Consumer consumer) { - this.runner.withUserConfiguration(configuration).run((context) -> consumer + this.contextRunner.withUserConfiguration(configuration).run((context) -> consumer .accept(context.getBean(ScheduledTasksEndpoint.class).scheduledTasks())); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/mappings/MappingsEndpointTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/mappings/MappingsEndpointTests.java index bc24af3c98..b4e5ee304c 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/mappings/MappingsEndpointTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/web/mappings/MappingsEndpointTests.java @@ -21,6 +21,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Vector; +import java.util.function.Supplier; import javax.servlet.FilterRegistration; import javax.servlet.ServletContext; @@ -47,6 +48,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.mock.web.MockServletConfig; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.context.ConfigurableWebApplicationContext; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.reactive.config.EnableWebFlux; @@ -68,8 +70,8 @@ import static org.mockito.Mockito.mock; */ public class MappingsEndpointTests { - @SuppressWarnings("unchecked") @Test + @SuppressWarnings("unchecked") public void servletWebMappings() { ServletContext servletContext = mock(ServletContext.class); given(servletContext.getInitParameterNames()) @@ -82,49 +84,51 @@ public class MappingsEndpointTests { ServletRegistration servletRegistration = mock(ServletRegistration.class); given((Map) servletContext.getServletRegistrations()) .willReturn(Collections.singletonMap("testServlet", servletRegistration)); - WebApplicationContextRunner runner = new WebApplicationContextRunner(() -> { + Supplier contextSupplier = () -> { AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext(); context.setServletContext(servletContext); return context; - }).withUserConfiguration(EndpointConfiguration.class, - ServletWebConfiguration.class); - runner.run((context) -> { - ContextMappings contextMappings = contextMappings(context); - assertThat(contextMappings.getParentId()).isNull(); - assertThat(contextMappings.getMappings()) - .containsOnlyKeys("dispatcherServlets", "servletFilters", "servlets"); - Map> dispatcherServlets = mappings( - contextMappings, "dispatcherServlets"); - assertThat(dispatcherServlets).containsOnlyKeys("dispatcherServlet"); - List handlerMappings = dispatcherServlets - .get("dispatcherServlet"); - assertThat(handlerMappings).hasSize(1); - List servlets = mappings( - contextMappings, "servlets"); - assertThat(servlets).hasSize(1); - List filters = mappings(contextMappings, - "servletFilters"); - assertThat(filters).hasSize(1); - }); + }; + new WebApplicationContextRunner(contextSupplier) + .withUserConfiguration(EndpointConfiguration.class, + ServletWebConfiguration.class) + .run((context) -> { + ContextMappings contextMappings = contextMappings(context); + assertThat(contextMappings.getParentId()).isNull(); + assertThat(contextMappings.getMappings()).containsOnlyKeys( + "dispatcherServlets", "servletFilters", "servlets"); + Map> dispatcherServlets = mappings( + contextMappings, "dispatcherServlets"); + assertThat(dispatcherServlets).containsOnlyKeys("dispatcherServlet"); + List handlerMappings = dispatcherServlets + .get("dispatcherServlet"); + assertThat(handlerMappings).hasSize(1); + List servlets = mappings( + contextMappings, "servlets"); + assertThat(servlets).hasSize(1); + List filters = mappings( + contextMappings, "servletFilters"); + assertThat(filters).hasSize(1); + }); } @Test public void reactiveWebMappings() { - ReactiveWebApplicationContextRunner runner = new ReactiveWebApplicationContextRunner() + new ReactiveWebApplicationContextRunner() .withUserConfiguration(EndpointConfiguration.class, - ReactiveWebConfiguration.class); - runner.run((context) -> { - ContextMappings contextMappings = contextMappings(context); - assertThat(contextMappings.getParentId()).isNull(); - assertThat(contextMappings.getMappings()) - .containsOnlyKeys("dispatcherHandlers"); - Map> dispatcherHandlers = mappings( - contextMappings, "dispatcherHandlers"); - assertThat(dispatcherHandlers).containsOnlyKeys("webHandler"); - List handlerMappings = dispatcherHandlers - .get("webHandler"); - assertThat(handlerMappings).hasSize(3); - }); + ReactiveWebConfiguration.class) + .run((context) -> { + ContextMappings contextMappings = contextMappings(context); + assertThat(contextMappings.getParentId()).isNull(); + assertThat(contextMappings.getMappings()) + .containsOnlyKeys("dispatcherHandlers"); + Map> dispatcherHandlers = mappings( + contextMappings, "dispatcherHandlers"); + assertThat(dispatcherHandlers).containsOnlyKeys("webHandler"); + List handlerMappings = dispatcherHandlers + .get("webHandler"); + assertThat(handlerMappings).hasSize(3); + }); } private ContextMappings contextMappings(ApplicationContext context) { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisConnectionConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisConnectionConfiguration.java index 414b8f0316..981989c255 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisConnectionConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisConnectionConfiguration.java @@ -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. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java index c0384333e4..072ea93810 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java @@ -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. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java index 7cb11d3e9d..4c4674b6b7 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java @@ -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. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/ErrorWebFluxAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/ErrorWebFluxAutoConfiguration.java index 7bd84a03b8..81d14a8e94 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/ErrorWebFluxAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/ErrorWebFluxAutoConfiguration.java @@ -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. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/ConditionalOnRepositoryTypeTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/ConditionalOnRepositoryTypeTests.java index ac9ffaa3b9..ba56812cd3 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/ConditionalOnRepositoryTypeTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/ConditionalOnRepositoryTypeTests.java @@ -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. @@ -30,24 +30,24 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class ConditionalOnRepositoryTypeTests { - private final ApplicationContextRunner runner = new ApplicationContextRunner(); + private final ApplicationContextRunner contextRunner = new ApplicationContextRunner(); @Test public void imperativeRepositoryMatchesWithNoConfiguredType() { - this.runner.withUserConfiguration(ImperativeRepository.class) + this.contextRunner.withUserConfiguration(ImperativeRepository.class) .run((context) -> assertThat(context) .hasSingleBean(ImperativeRepository.class)); } @Test public void reactiveRepositoryMatchesWithNoConfiguredType() { - this.runner.withUserConfiguration(ReactiveRepository.class).run( + this.contextRunner.withUserConfiguration(ReactiveRepository.class).run( (context) -> assertThat(context).hasSingleBean(ReactiveRepository.class)); } @Test public void imperativeRepositoryMatchesWithAutoConfiguredType() { - this.runner.withUserConfiguration(ImperativeRepository.class) + this.contextRunner.withUserConfiguration(ImperativeRepository.class) .withPropertyValues("spring.data.test.repositories.type:auto") .run((context) -> assertThat(context) .hasSingleBean(ImperativeRepository.class)); @@ -55,7 +55,7 @@ public class ConditionalOnRepositoryTypeTests { @Test public void reactiveRepositoryMatchesWithAutoConfiguredType() { - this.runner.withUserConfiguration(ReactiveRepository.class) + this.contextRunner.withUserConfiguration(ReactiveRepository.class) .withPropertyValues("spring.data.test.repositories.type:auto") .run((context) -> assertThat(context) .hasSingleBean(ReactiveRepository.class)); @@ -63,7 +63,7 @@ public class ConditionalOnRepositoryTypeTests { @Test public void imperativeRepositoryMatchesWithImperativeConfiguredType() { - this.runner.withUserConfiguration(ImperativeRepository.class) + this.contextRunner.withUserConfiguration(ImperativeRepository.class) .withPropertyValues("spring.data.test.repositories.type:imperative") .run((context) -> assertThat(context) .hasSingleBean(ImperativeRepository.class)); @@ -71,7 +71,7 @@ public class ConditionalOnRepositoryTypeTests { @Test public void reactiveRepositoryMatchesWithReactiveConfiguredType() { - this.runner.withUserConfiguration(ReactiveRepository.class) + this.contextRunner.withUserConfiguration(ReactiveRepository.class) .withPropertyValues("spring.data.test.repositories.type:reactive") .run((context) -> assertThat(context) .hasSingleBean(ReactiveRepository.class)); @@ -79,7 +79,7 @@ public class ConditionalOnRepositoryTypeTests { @Test public void imperativeRepositoryDoesNotMatchWithReactiveConfiguredType() { - this.runner.withUserConfiguration(ImperativeRepository.class) + this.contextRunner.withUserConfiguration(ImperativeRepository.class) .withPropertyValues("spring.data.test.repositories.type:reactive") .run((context) -> assertThat(context) .doesNotHaveBean(ImperativeRepository.class)); @@ -87,7 +87,7 @@ public class ConditionalOnRepositoryTypeTests { @Test public void reactiveRepositoryDoesNotMatchWithImperativeConfiguredType() { - this.runner.withUserConfiguration(ReactiveRepository.class) + this.contextRunner.withUserConfiguration(ReactiveRepository.class) .withPropertyValues("spring.data.test.repositories.type:imperative") .run((context) -> assertThat(context) .doesNotHaveBean(ReactiveRepository.class)); @@ -95,7 +95,7 @@ public class ConditionalOnRepositoryTypeTests { @Test public void imperativeRepositoryDoesNotMatchWithNoneConfiguredType() { - this.runner.withUserConfiguration(ImperativeRepository.class) + this.contextRunner.withUserConfiguration(ImperativeRepository.class) .withPropertyValues("spring.data.test.repositories.type:none") .run((context) -> assertThat(context) .doesNotHaveBean(ImperativeRepository.class)); @@ -103,7 +103,7 @@ public class ConditionalOnRepositoryTypeTests { @Test public void reactiveRepositoryDoesNotMatchWithNoneConfiguredType() { - this.runner.withUserConfiguration(ReactiveRepository.class) + this.contextRunner.withUserConfiguration(ReactiveRepository.class) .withPropertyValues("spring.data.test.repositories.type:none") .run((context) -> assertThat(context) .doesNotHaveBean(ReactiveRepository.class)); @@ -111,7 +111,7 @@ public class ConditionalOnRepositoryTypeTests { @Test public void failsFastWhenConfiguredTypeIsUnknown() { - this.runner.withUserConfiguration(ReactiveRepository.class) + this.contextRunner.withUserConfiguration(ReactiveRepository.class) .withPropertyValues("spring.data.test.repositories.type:abcde") .run((context) -> assertThat(context).hasFailed()); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesAutoConfigurationTests.java index 6e87cb2514..aa771eba9e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesAutoConfigurationTests.java @@ -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. @@ -55,7 +55,7 @@ import static org.mockito.Mockito.mock; */ public class CassandraReactiveRepositoriesAutoConfigurationTests { - private final ApplicationContextRunner runner = new ApplicationContextRunner() + private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() .withConfiguration(AutoConfigurations.of(CassandraAutoConfiguration.class, CassandraRepositoriesAutoConfiguration.class, CassandraDataAutoConfiguration.class, @@ -65,16 +65,17 @@ public class CassandraReactiveRepositoriesAutoConfigurationTests { @Test public void testDefaultRepositoryConfiguration() { - this.runner.withUserConfiguration(TestConfiguration.class).run((context) -> { - assertThat(context).hasSingleBean(ReactiveCityRepository.class); - assertThat(context).hasSingleBean(Cluster.class); - assertThat(getInitialEntitySet(context)).hasSize(1); - }); + this.contextRunner.withUserConfiguration(TestConfiguration.class) + .run((context) -> { + assertThat(context).hasSingleBean(ReactiveCityRepository.class); + assertThat(context).hasSingleBean(Cluster.class); + assertThat(getInitialEntitySet(context)).hasSize(1); + }); } @Test public void testNoRepositoryConfiguration() { - this.runner.withUserConfiguration(TestExcludeConfiguration.class, + this.contextRunner.withUserConfiguration(TestExcludeConfiguration.class, EmptyConfiguration.class).run((context) -> { assertThat(context).hasSingleBean(Cluster.class); assertThat(getInitialEntitySet(context)).hasSize(1) @@ -84,7 +85,7 @@ public class CassandraReactiveRepositoriesAutoConfigurationTests { @Test public void doesNotTriggerDefaultRepositoryDetectionIfCustomized() { - this.runner.withUserConfiguration(TestExcludeConfiguration.class, + this.contextRunner.withUserConfiguration(TestExcludeConfiguration.class, CustomizedConfiguration.class).run((context) -> { assertThat(context) .hasSingleBean(ReactiveCityCassandraRepository.class); @@ -95,7 +96,7 @@ public class CassandraReactiveRepositoriesAutoConfigurationTests { @Test public void enablingImperativeRepositoriesDisablesReactiveRepositories() { - this.runner.withUserConfiguration(TestConfiguration.class) + this.contextRunner.withUserConfiguration(TestConfiguration.class) .withPropertyValues("spring.data.cassandra.repositories.type=imperative") .run((context) -> assertThat(context) .doesNotHaveBean(ReactiveCityRepository.class)); @@ -103,7 +104,7 @@ public class CassandraReactiveRepositoriesAutoConfigurationTests { @Test public void enablingNoRepositoriesDisablesReactiveRepositories() { - this.runner.withUserConfiguration(TestConfiguration.class) + this.contextRunner.withUserConfiguration(TestConfiguration.class) .withPropertyValues("spring.data.cassandra.repositories.type=none") .run((context) -> assertThat(context) .doesNotHaveBean(ReactiveCityRepository.class)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesAutoConfigurationTests.java index dd06090230..c03ede1aac 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesAutoConfigurationTests.java @@ -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. @@ -52,7 +52,7 @@ import static org.mockito.Mockito.mock; */ public class CassandraRepositoriesAutoConfigurationTests { - private final ApplicationContextRunner runner = new ApplicationContextRunner() + private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() .withConfiguration(AutoConfigurations.of(CassandraAutoConfiguration.class, CassandraRepositoriesAutoConfiguration.class, CassandraDataAutoConfiguration.class, @@ -60,7 +60,7 @@ public class CassandraRepositoriesAutoConfigurationTests { @Test public void testDefaultRepositoryConfiguration() { - this.runner.withUserConfiguration(TestConfiguration.class).run((context) -> { + this.contextRunner.withUserConfiguration(TestConfiguration.class).run((context) -> { assertThat(context).hasSingleBean(CityRepository.class); assertThat(context).hasSingleBean(Cluster.class); assertThat(getInitialEntitySet(context)).hasSize(1); @@ -69,7 +69,7 @@ public class CassandraRepositoriesAutoConfigurationTests { @Test public void testNoRepositoryConfiguration() { - this.runner.withUserConfiguration(TestExcludeConfiguration.class, + this.contextRunner.withUserConfiguration(TestExcludeConfiguration.class, EmptyConfiguration.class).run((context) -> { assertThat(context).hasSingleBean(Cluster.class); assertThat(getInitialEntitySet(context)).hasSize(1) @@ -79,7 +79,7 @@ public class CassandraRepositoriesAutoConfigurationTests { @Test public void doesNotTriggerDefaultRepositoryDetectionIfCustomized() { - this.runner.withUserConfiguration(TestExcludeConfiguration.class, + this.contextRunner.withUserConfiguration(TestExcludeConfiguration.class, CustomizedConfiguration.class).run((context) -> { assertThat(context).hasSingleBean(CityCassandraRepository.class); assertThat(getInitialEntitySet(context)).hasSize(1) @@ -89,7 +89,7 @@ public class CassandraRepositoriesAutoConfigurationTests { @Test public void enablingReactiveRepositoriesDisablesImperativeRepositories() { - this.runner.withUserConfiguration(TestConfiguration.class) + this.contextRunner.withUserConfiguration(TestConfiguration.class) .withPropertyValues("spring.data.cassandra.repositories.type=reactive") .run((context) -> assertThat(context) .doesNotHaveBean(CityCassandraRepository.class)); @@ -97,7 +97,7 @@ public class CassandraRepositoriesAutoConfigurationTests { @Test public void enablingNoRepositoriesDisablesImperativeRepositories() { - this.runner.withUserConfiguration(TestConfiguration.class) + this.contextRunner.withUserConfiguration(TestConfiguration.class) .withPropertyValues("spring.data.cassandra.repositories.type=none") .run((context) -> assertThat(context) .doesNotHaveBean(CityCassandraRepository.class)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoReactiveRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoReactiveRepositoriesAutoConfigurationTests.java index 5c4f460bb7..3d16158772 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoReactiveRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoReactiveRepositoriesAutoConfigurationTests.java @@ -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. @@ -48,7 +48,7 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class MongoReactiveRepositoriesAutoConfigurationTests { - private final ApplicationContextRunner runner = new ApplicationContextRunner() + private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() .withConfiguration(AutoConfigurations.of(MongoAutoConfiguration.class, MongoDataAutoConfiguration.class, MongoReactiveAutoConfiguration.class, @@ -58,7 +58,7 @@ public class MongoReactiveRepositoriesAutoConfigurationTests { @Test public void testDefaultRepositoryConfiguration() { - this.runner.withUserConfiguration(TestConfiguration.class).run((context) -> { + this.contextRunner.withUserConfiguration(TestConfiguration.class).run((context) -> { assertThat(context).hasSingleBean(ReactiveCityRepository.class); assertThat(context).hasSingleBean(MongoClient.class); MongoMappingContext mappingContext = context @@ -72,27 +72,27 @@ public class MongoReactiveRepositoriesAutoConfigurationTests { @Test public void testNoRepositoryConfiguration() { - this.runner.withUserConfiguration(EmptyConfiguration.class) + this.contextRunner.withUserConfiguration(EmptyConfiguration.class) .run((context) -> assertThat(context).hasSingleBean(MongoClient.class)); } @Test public void doesNotTriggerDefaultRepositoryDetectionIfCustomized() { - this.runner.withUserConfiguration(CustomizedConfiguration.class) + this.contextRunner.withUserConfiguration(CustomizedConfiguration.class) .run((context) -> assertThat(context) .doesNotHaveBean(ReactiveCityMongoDbRepository.class)); } @Test public void autoConfigurationShouldNotKickInEvenIfManualConfigDidNotCreateAnyRepositories() { - this.runner.withUserConfiguration(SortOfInvalidCustomConfiguration.class) + this.contextRunner.withUserConfiguration(SortOfInvalidCustomConfiguration.class) .run((context) -> assertThat(context) .doesNotHaveBean(ReactiveCityRepository.class)); } @Test public void enablingImperativeRepositoriesDisablesReactiveRepositories() { - this.runner.withUserConfiguration(TestConfiguration.class) + this.contextRunner.withUserConfiguration(TestConfiguration.class) .withPropertyValues("spring.data.mongodb.repositories.type=imperative") .run((context) -> assertThat(context) .doesNotHaveBean(ReactiveCityRepository.class)); @@ -100,7 +100,7 @@ public class MongoReactiveRepositoriesAutoConfigurationTests { @Test public void enablingNoRepositoriesDisablesReactiveRepositories() { - this.runner.withUserConfiguration(TestConfiguration.class) + this.contextRunner.withUserConfiguration(TestConfiguration.class) .withPropertyValues("spring.data.mongodb.repositories.type=none") .run((context) -> assertThat(context) .doesNotHaveBean(ReactiveCityRepository.class)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoRepositoriesAutoConfigurationTests.java index 256eb575b1..d4da50297e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoRepositoriesAutoConfigurationTests.java @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class MongoRepositoriesAutoConfigurationTests { - private final ApplicationContextRunner runner = new ApplicationContextRunner() + private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() .withConfiguration(AutoConfigurations.of(MongoAutoConfiguration.class, MongoDataAutoConfiguration.class, MongoRepositoriesAutoConfiguration.class, @@ -53,7 +53,7 @@ public class MongoRepositoriesAutoConfigurationTests { @Test public void testDefaultRepositoryConfiguration() { - this.runner.withUserConfiguration(TestConfiguration.class).run((context) -> { + this.contextRunner.withUserConfiguration(TestConfiguration.class).run((context) -> { assertThat(context).hasSingleBean(CityRepository.class); assertThat(context).hasSingleBean(MongoClient.class); MongoMappingContext mappingContext = context @@ -67,26 +67,26 @@ public class MongoRepositoriesAutoConfigurationTests { @Test public void testNoRepositoryConfiguration() { - this.runner.withUserConfiguration(EmptyConfiguration.class) + this.contextRunner.withUserConfiguration(EmptyConfiguration.class) .run((context) -> assertThat(context).hasSingleBean(MongoClient.class)); } @Test public void doesNotTriggerDefaultRepositoryDetectionIfCustomized() { - this.runner.withUserConfiguration(CustomizedConfiguration.class) + this.contextRunner.withUserConfiguration(CustomizedConfiguration.class) .run((context) -> assertThat(context) .hasSingleBean(CityMongoDbRepository.class)); } @Test public void autoConfigurationShouldNotKickInEvenIfManualConfigDidNotCreateAnyRepositories() { - this.runner.withUserConfiguration(SortOfInvalidCustomConfiguration.class).run( + this.contextRunner.withUserConfiguration(SortOfInvalidCustomConfiguration.class).run( (context) -> assertThat(context).doesNotHaveBean(CityRepository.class)); } @Test public void enablingReactiveRepositoriesDisablesImperativeRepositories() { - this.runner.withUserConfiguration(TestConfiguration.class) + this.contextRunner.withUserConfiguration(TestConfiguration.class) .withPropertyValues("spring.data.mongodb.repositories.type=reactive") .run((context) -> assertThat(context) .doesNotHaveBean(CityRepository.class)); @@ -94,7 +94,7 @@ public class MongoRepositoriesAutoConfigurationTests { @Test public void enablingNoRepositoriesDisablesImperativeRepositories() { - this.runner.withUserConfiguration(TestConfiguration.class) + this.contextRunner.withUserConfiguration(TestConfiguration.class) .withPropertyValues("spring.data.mongodb.repositories.type=none") .run((context) -> assertThat(context) .doesNotHaveBean(CityRepository.class)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java index 0e2a0e76d9..4e8152d1e4 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java @@ -66,10 +66,8 @@ public class RedisAutoConfigurationTests { @Test public void testOverrideRedisConfiguration() { - this.contextRunner - .withPropertyValues("spring.redis.host:foo", - "spring.redis.database:1", - "spring.redis.lettuce.shutdown-timeout:500") + this.contextRunner.withPropertyValues("spring.redis.host:foo", + "spring.redis.database:1", "spring.redis.lettuce.shutdown-timeout:500") .run((context) -> { LettuceConnectionFactory cf = context .getBean(LettuceConnectionFactory.class); @@ -83,8 +81,7 @@ public class RedisAutoConfigurationTests { @Test public void testCustomizeRedisConfiguration() { - this.contextRunner - .withUserConfiguration(CustomConfiguration.class) + this.contextRunner.withUserConfiguration(CustomConfiguration.class) .run((context) -> { LettuceConnectionFactory cf = context .getBean(LettuceConnectionFactory.class); @@ -125,19 +122,17 @@ public class RedisAutoConfigurationTests { @Test public void testRedisConfigurationWithPool() { - this.contextRunner - .withPropertyValues("spring.redis.host:foo", - "spring.redis.lettuce.pool.min-idle:1", - "spring.redis.lettuce.pool.max-idle:4", - "spring.redis.lettuce.pool.max-active:16", - "spring.redis.lettuce.pool.max-wait:2000", - "spring.redis.lettuce.shutdown-timeout:1000") - .run((context) -> { + this.contextRunner.withPropertyValues("spring.redis.host:foo", + "spring.redis.lettuce.pool.min-idle:1", + "spring.redis.lettuce.pool.max-idle:4", + "spring.redis.lettuce.pool.max-active:16", + "spring.redis.lettuce.pool.max-wait:2000", + "spring.redis.lettuce.shutdown-timeout:1000").run((context) -> { LettuceConnectionFactory cf = context .getBean(LettuceConnectionFactory.class); assertThat(cf.getHostName()).isEqualTo("foo"); - GenericObjectPoolConfig poolConfig = - getPoolingClientConfiguration(cf).getPoolConfig(); + GenericObjectPoolConfig poolConfig = getPoolingClientConfiguration(cf) + .getPoolConfig(); assertThat(poolConfig.getMinIdle()).isEqualTo(1); assertThat(poolConfig.getMaxIdle()).isEqualTo(4); assertThat(poolConfig.getMaxTotal()).isEqualTo(16); @@ -149,8 +144,7 @@ public class RedisAutoConfigurationTests { @Test public void testRedisConfigurationWithTimeout() { this.contextRunner - .withPropertyValues("spring.redis.host:foo", - "spring.redis.timeout:100") + .withPropertyValues("spring.redis.host:foo", "spring.redis.timeout:100") .run((context) -> { LettuceConnectionFactory cf = context .getBean(LettuceConnectionFactory.class); @@ -183,10 +177,11 @@ public class RedisAutoConfigurationTests { LettuceConnectionFactory connectionFactory = context .getBean(LettuceConnectionFactory.class); assertThat(connectionFactory.getPassword()).isEqualTo("password"); - Set sentinels = connectionFactory.getSentinelConfiguration() - .getSentinels(); - assertThat(sentinels.stream().map(Object::toString).collect(Collectors.toSet())) - .contains("127.0.0.1:26379", "127.0.0.1:26380"); + Set sentinels = connectionFactory + .getSentinelConfiguration().getSentinels(); + assertThat(sentinels.stream().map(Object::toString) + .collect(Collectors.toSet())).contains("127.0.0.1:26379", + "127.0.0.1:26380"); }); } @@ -194,7 +189,8 @@ public class RedisAutoConfigurationTests { public void testRedisConfigurationWithCluster() { List clusterNodes = Arrays.asList("127.0.0.1:27379", "127.0.0.1:27380"); this.contextRunner - .withPropertyValues("spring.redis.cluster.nodes[0]:" + clusterNodes.get(0), + .withPropertyValues( + "spring.redis.cluster.nodes[0]:" + clusterNodes.get(0), "spring.redis.cluster.nodes[1]:" + clusterNodes.get(1)) .run((context) -> { assertThat(context.getBean(LettuceConnectionFactory.class) @@ -211,8 +207,9 @@ public class RedisAutoConfigurationTests { "spring.redis.cluster.nodes[0]:" + clusterNodes.get(0), "spring.redis.cluster.nodes[1]:" + clusterNodes.get(1)) .run((context) -> { - assertThat(context.getBean(LettuceConnectionFactory.class).getPassword()) - .isEqualTo("password"); + assertThat( + context.getBean(LettuceConnectionFactory.class).getPassword()) + .isEqualTo("password"); }); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisReactiveAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisReactiveAutoConfigurationTests.java index 33f2a415ac..cbf735968b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisReactiveAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisReactiveAutoConfigurationTests.java @@ -34,8 +34,8 @@ import static org.assertj.core.api.Assertions.assertThat; public class RedisReactiveAutoConfigurationTests { private ApplicationContextRunner contextRunner = new ApplicationContextRunner() - .withConfiguration(AutoConfigurations - .of(RedisAutoConfiguration.class, RedisReactiveAutoConfiguration.class)); + .withConfiguration(AutoConfigurations.of(RedisAutoConfiguration.class, + RedisReactiveAutoConfiguration.class)); @Test public void testDefaultRedisConfiguration() { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestAutoConfigurationTests.java index b6ca560619..b1e9d8199d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/elasticsearch/jest/JestAutoConfigurationTests.java @@ -59,8 +59,8 @@ import static org.mockito.Mockito.mock; public class JestAutoConfigurationTests { private ApplicationContextRunner contextRunner = new ApplicationContextRunner() - .withConfiguration(AutoConfigurations - .of(GsonAutoConfiguration.class, JestAutoConfiguration.class)); + .withConfiguration(AutoConfigurations.of(GsonAutoConfiguration.class, + JestAutoConfiguration.class)); @Before public void preventElasticsearchFromConfiguringNetty() { @@ -81,32 +81,34 @@ public class JestAutoConfigurationTests { @Test public void customJestClient() { - this.contextRunner - .withUserConfiguration(CustomJestClient.class) - .withPropertyValues("spring.elasticsearch.jest.uris[0]=http://localhost:9200") + this.contextRunner.withUserConfiguration(CustomJestClient.class) + .withPropertyValues( + "spring.elasticsearch.jest.uris[0]=http://localhost:9200") .run((context) -> { - assertThat(context.getBeansOfType(JestClient.class)).hasSize(1); - }); + assertThat(context.getBeansOfType(JestClient.class)).hasSize(1); + }); } @Test public void customGson() { - this.contextRunner - .withUserConfiguration(CustomGson.class) - .withPropertyValues("spring.elasticsearch.jest.uris=http://localhost:9200") + this.contextRunner.withUserConfiguration(CustomGson.class) + .withPropertyValues( + "spring.elasticsearch.jest.uris=http://localhost:9200") .run((context) -> { - JestHttpClient client = (JestHttpClient) context.getBean(JestClient.class); + JestHttpClient client = (JestHttpClient) context + .getBean(JestClient.class); assertThat(client.getGson()).isSameAs(context.getBean("customGson")); }); } @Test public void customizerOverridesAutoConfig() { - this.contextRunner - .withUserConfiguration(BuilderCustomizer.class) - .withPropertyValues("spring.elasticsearch.jest.uris=http://localhost:9200") + this.contextRunner.withUserConfiguration(BuilderCustomizer.class) + .withPropertyValues( + "spring.elasticsearch.jest.uris=http://localhost:9200") .run((context) -> { - JestHttpClient client = (JestHttpClient) context.getBean(JestClient.class); + JestHttpClient client = (JestHttpClient) context + .getBean(JestClient.class); assertThat(client.getGson()) .isSameAs(context.getBean(BuilderCustomizer.class).getGson()); }); @@ -115,37 +117,36 @@ public class JestAutoConfigurationTests { @Test public void proxyHostWithoutPort() { this.contextRunner - .withPropertyValues("spring.elasticsearch.jest.uris=http://localhost:9200", - "spring.elasticsearch.jest.proxy.host=proxy.example.com") - .run((context) -> { - assertThat(context.getStartupFailure()) - .isInstanceOf(BeanCreationException.class) - .hasMessageContaining("Proxy port must not be null"); - }); + .withPropertyValues( + "spring.elasticsearch.jest.uris=http://localhost:9200", + "spring.elasticsearch.jest.proxy.host=proxy.example.com") + .run((context) -> { + assertThat(context.getStartupFailure()) + .isInstanceOf(BeanCreationException.class) + .hasMessageContaining("Proxy port must not be null"); + }); } @Test public void jestCanCommunicateWithElasticsearchInstance() { - new ElasticsearchNodeTemplate().doWithNode((node) -> - this.contextRunner - .withPropertyValues("spring.elasticsearch.jest.uris=http://localhost:" - + node.getHttpPort()) - .run((context) -> { - JestClient client = context.getBean(JestClient.class); - Map source = new HashMap<>(); - source.put("a", "alpha"); - source.put("b", "bravo"); - Index index = new Index.Builder(source).index("foo").type("bar").build(); - execute(client, index); - SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); - searchSourceBuilder.query(QueryBuilders.matchQuery("a", "alpha")); - assertThat( - execute(client, - new Search.Builder(searchSourceBuilder.toString()) - .addIndex("foo").build()).getResponseCode()) - .isEqualTo(200); - }) - ); + new ElasticsearchNodeTemplate().doWithNode((node) -> this.contextRunner + .withPropertyValues("spring.elasticsearch.jest.uris=http://localhost:" + + node.getHttpPort()) + .run((context) -> { + JestClient client = context.getBean(JestClient.class); + Map source = new HashMap<>(); + source.put("a", "alpha"); + source.put("b", "bravo"); + Index index = new Index.Builder(source).index("foo").type("bar") + .build(); + execute(client, index); + SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); + searchSourceBuilder.query(QueryBuilders.matchQuery("a", "alpha")); + assertThat(execute(client, + new Search.Builder(searchSourceBuilder.toString()) + .addIndex("foo").build()).getResponseCode()) + .isEqualTo(200); + })); } private JestResult execute(JestClient client, Action action) { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/info/ProjectInfoAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/info/ProjectInfoAutoConfigurationTests.java index b564430137..68b297d3e9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/info/ProjectInfoAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/info/ProjectInfoAutoConfigurationTests.java @@ -38,9 +38,9 @@ import static org.assertj.core.api.Assertions.assertThat; public class ProjectInfoAutoConfigurationTests { private ApplicationContextRunner contextRunner = new ApplicationContextRunner() - .withConfiguration(AutoConfigurations.of(PropertyPlaceholderAutoConfiguration.class, - ProjectInfoAutoConfiguration.class)); - + .withConfiguration( + AutoConfigurations.of(PropertyPlaceholderAutoConfiguration.class, + ProjectInfoAutoConfiguration.class)); @Test public void gitPropertiesUnavailableIfResourceNotAvailable() { @@ -51,9 +51,9 @@ public class ProjectInfoAutoConfigurationTests { @Test public void gitPropertiesWithNoData() { - this.contextRunner.withPropertyValues( - "spring.info.git.location=" + - "classpath:/org/springframework/boot/autoconfigure/info/git-no-data.properties") + this.contextRunner + .withPropertyValues("spring.info.git.location=" + + "classpath:/org/springframework/boot/autoconfigure/info/git-no-data.properties") .run((context) -> { GitProperties gitProperties = context.getBean(GitProperties.class); assertThat(gitProperties.getBranch()).isNull(); @@ -63,11 +63,12 @@ public class ProjectInfoAutoConfigurationTests { @Test public void gitPropertiesFallbackWithGitPropertiesBean() { this.contextRunner.withUserConfiguration(CustomInfoPropertiesConfiguration.class) - .withPropertyValues("spring.info.git.location=" + - "classpath:/org/springframework/boot/autoconfigure/info/git.properties") + .withPropertyValues("spring.info.git.location=" + + "classpath:/org/springframework/boot/autoconfigure/info/git.properties") .run((context) -> { GitProperties gitProperties = context.getBean(GitProperties.class); - assertThat(gitProperties).isSameAs(context.getBean("customGitProperties")); + assertThat(gitProperties) + .isSameAs(context.getBean("customGitProperties")); }); } @@ -79,30 +80,33 @@ public class ProjectInfoAutoConfigurationTests { assertThat(buildProperties.getArtifact()).isEqualTo("demo"); assertThat(buildProperties.getName()).isEqualTo("Demo Project"); assertThat(buildProperties.getVersion()).isEqualTo("0.0.1-SNAPSHOT"); - assertThat(buildProperties.getTime().toEpochMilli()).isEqualTo(1457100965000L); + assertThat(buildProperties.getTime().toEpochMilli()) + .isEqualTo(1457100965000L); }); } @Test public void buildPropertiesCustomLocation() { this.contextRunner - .withPropertyValues("spring.info.build.location=" + - "classpath:/org/springframework/boot/autoconfigure/info/build-info.properties") + .withPropertyValues("spring.info.build.location=" + + "classpath:/org/springframework/boot/autoconfigure/info/build-info.properties") .run((context) -> { - BuildProperties buildProperties = context.getBean(BuildProperties.class); + BuildProperties buildProperties = context + .getBean(BuildProperties.class); assertThat(buildProperties.getGroup()).isEqualTo("com.example.acme"); assertThat(buildProperties.getArtifact()).isEqualTo("acme"); assertThat(buildProperties.getName()).isEqualTo("acme"); assertThat(buildProperties.getVersion()).isEqualTo("1.0.1-SNAPSHOT"); - assertThat(buildProperties.getTime().toEpochMilli()).isEqualTo(1457088120000L); + assertThat(buildProperties.getTime().toEpochMilli()) + .isEqualTo(1457088120000L); }); } @Test public void buildPropertiesCustomInvalidLocation() { this.contextRunner - .withPropertyValues("spring.info.build.location=" + - "classpath:/org/acme/no-build-info.properties") + .withPropertyValues("spring.info.build.location=" + + "classpath:/org/acme/no-build-info.properties") .run((context) -> { assertThat(context.getBeansOfType(BuildProperties.class)).hasSize(0); }); @@ -110,10 +114,10 @@ public class ProjectInfoAutoConfigurationTests { @Test public void buildPropertiesFallbackWithBuildInfoBean() { - this.contextRunner - .withUserConfiguration(CustomInfoPropertiesConfiguration.class) + this.contextRunner.withUserConfiguration(CustomInfoPropertiesConfiguration.class) .run((context) -> { - BuildProperties buildProperties = context.getBean(BuildProperties.class); + BuildProperties buildProperties = context + .getBean(BuildProperties.class); assertThat(buildProperties) .isSameAs(context.getBean("customBuildProperties")); }); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/HikariDataSourceConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/HikariDataSourceConfigurationTests.java index 05a769415d..523dae6b99 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/HikariDataSourceConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/HikariDataSourceConfigurationTests.java @@ -54,8 +54,7 @@ public class HikariDataSourceConfigurationTests { public void testDataSourcePropertiesOverridden() { this.contextRunner.withPropertyValues( "spring.datasource.hikari.jdbc-url=jdbc:foo//bar/spam", - "spring.datasource.hikari.max-lifetime=1234") - .run((context) -> { + "spring.datasource.hikari.max-lifetime=1234").run((context) -> { HikariDataSource ds = context.getBean(HikariDataSource.class); assertThat(ds.getJdbcUrl()).isEqualTo("jdbc:foo//bar/spam"); assertThat(ds.getMaxLifetime()).isEqualTo(1234); @@ -65,13 +64,14 @@ public class HikariDataSourceConfigurationTests { @Test public void testDataSourceGenericPropertiesOverridden() { - this.contextRunner.withPropertyValues( - "spring.datasource.hikari.data-source-properties" + - ".dataSourceClassName=org.h2.JDBCDataSource") + this.contextRunner + .withPropertyValues("spring.datasource.hikari.data-source-properties" + + ".dataSourceClassName=org.h2.JDBCDataSource") .run((context) -> { HikariDataSource ds = context.getBean(HikariDataSource.class); - assertThat(ds.getDataSourceProperties().getProperty("dataSourceClassName")) - .isEqualTo("org.h2.JDBCDataSource"); + assertThat(ds.getDataSourceProperties() + .getProperty("dataSourceClassName")) + .isEqualTo("org.h2.JDBCDataSource"); }); } @@ -96,9 +96,9 @@ public class HikariDataSourceConfigurationTests { @Test public void poolNameTakesPrecedenceOverName() { - this.contextRunner.withPropertyValues( - "spring.datasource.name=myDS", - "spring.datasource.hikari.pool-name=myHikariDS") + this.contextRunner + .withPropertyValues("spring.datasource.name=myDS", + "spring.datasource.hikari.pool-name=myHikariDS") .run((context) -> { HikariDataSource ds = context.getBean(HikariDataSource.class); assertThat(ds.getPoolName()).isEqualTo("myHikariDS"); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jooq/JooqAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jooq/JooqAutoConfigurationTests.java index 7b866991d3..7acce14c41 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jooq/JooqAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jooq/JooqAutoConfigurationTests.java @@ -57,13 +57,10 @@ import static org.junit.Assert.fail; */ public class JooqAutoConfigurationTests { - private static final String[] NO_BEANS = {}; - private ApplicationContextRunner contextRunner = new ApplicationContextRunner() .withConfiguration(AutoConfigurations.of(JooqAutoConfiguration.class)) .withPropertyValues("spring.datasource.name:jooqtest"); - @Rule public ExpectedException thrown = ExpectedException.none(); @@ -76,13 +73,10 @@ public class JooqAutoConfigurationTests { @Test public void jooqWithoutTx() { - this.contextRunner - .withUserConfiguration(JooqDataSourceConfiguration.class) + this.contextRunner.withUserConfiguration(JooqDataSourceConfiguration.class) .run((context) -> { - assertThat(context.getBeanNamesForType( - PlatformTransactionManager.class)).isEqualTo(NO_BEANS); - assertThat(context.getBeanNamesForType( - SpringTransactionProvider.class)).isEqualTo(NO_BEANS); + assertThat(context).doesNotHaveBean(PlatformTransactionManager.class); + assertThat(context).doesNotHaveBean(SpringTransactionProvider.class); DSLContext dsl = context.getBean(DSLContext.class); dsl.execute("create table jooqtest (name varchar(255) primary key);"); dsl.transaction(new AssertFetch(dsl, @@ -92,31 +86,29 @@ public class JooqAutoConfigurationTests { dsl.transaction(new AssertFetch(dsl, "select count(*) as total from jooqtest;", "1")); try { - dsl.transaction( - new ExecuteSql(dsl, - "insert into jooqtest (name) values ('bar');", - "insert into jooqtest (name) values ('foo');")); + dsl.transaction(new ExecuteSql(dsl, + "insert into jooqtest (name) values ('bar');", + "insert into jooqtest (name) values ('foo');")); fail("An DataIntegrityViolationException should have been thrown."); } catch (DataIntegrityViolationException ex) { // Ignore } - dsl.transaction( - new AssertFetch(dsl, - "select count(*) as total from jooqtest;", "2")); - + dsl.transaction(new AssertFetch(dsl, + "select count(*) as total from jooqtest;", "2")); }); } @Test public void jooqWithTx() { - this.contextRunner - .withUserConfiguration(JooqDataSourceConfiguration.class, TxManagerConfiguration.class) - .run((context) -> { - context.getBean(PlatformTransactionManager.class); + this.contextRunner.withUserConfiguration(JooqDataSourceConfiguration.class, + TxManagerConfiguration.class).run((context) -> { + assertThat(context).hasSingleBean(PlatformTransactionManager.class); DSLContext dsl = context.getBean(DSLContext.class); - assertThat(dsl.configuration().dialect()).isEqualTo(SQLDialect.HSQLDB); - dsl.execute("create table jooqtest_tx (name varchar(255) primary key);"); + assertThat(dsl.configuration().dialect()) + .isEqualTo(SQLDialect.HSQLDB); + dsl.execute( + "create table jooqtest_tx (name varchar(255) primary key);"); dsl.transaction(new AssertFetch(dsl, "select count(*) as total from jooqtest_tx;", "0")); dsl.transaction(new ExecuteSql(dsl, @@ -124,45 +116,44 @@ public class JooqAutoConfigurationTests { dsl.transaction(new AssertFetch(dsl, "select count(*) as total from jooqtest_tx;", "1")); try { - dsl.transaction( - new ExecuteSql(dsl, "insert into jooqtest (name) values ('bar');", - "insert into jooqtest (name) values ('foo');")); + dsl.transaction(new ExecuteSql(dsl, + "insert into jooqtest (name) values ('bar');", + "insert into jooqtest (name) values ('foo');")); fail("A DataIntegrityViolationException should have been thrown."); } catch (DataIntegrityViolationException ex) { // Ignore } - dsl.transaction( - new AssertFetch(dsl, - "select count(*) as total from jooqtest_tx;", "1")); + dsl.transaction(new AssertFetch(dsl, + "select count(*) as total from jooqtest_tx;", "1")); }); } @Test public void customProvidersArePickedUp() { - this.contextRunner - .withUserConfiguration(JooqDataSourceConfiguration.class, TxManagerConfiguration.class, - TestRecordMapperProvider.class, TestRecordListenerProvider.class, - TestExecuteListenerProvider.class, TestVisitListenerProvider.class) - .run((context) -> { + this.contextRunner.withUserConfiguration(JooqDataSourceConfiguration.class, + TxManagerConfiguration.class, TestRecordMapperProvider.class, + TestRecordListenerProvider.class, TestExecuteListenerProvider.class, + TestVisitListenerProvider.class).run((context) -> { DSLContext dsl = context.getBean(DSLContext.class); assertThat(dsl.configuration().recordMapperProvider().getClass()) .isEqualTo(TestRecordMapperProvider.class); - assertThat(dsl.configuration().recordListenerProviders().length).isEqualTo(1); - assertThat(dsl.configuration().executeListenerProviders().length).isEqualTo(2); - assertThat(dsl.configuration().visitListenerProviders().length).isEqualTo(1); + assertThat(dsl.configuration().recordListenerProviders().length) + .isEqualTo(1); + assertThat(dsl.configuration().executeListenerProviders().length) + .isEqualTo(2); + assertThat(dsl.configuration().visitListenerProviders().length) + .isEqualTo(1); }); } @Test public void relaxedBindingOfSqlDialect() { - this.contextRunner - .withUserConfiguration(JooqDataSourceConfiguration.class) - .withPropertyValues("spring.jooq.sql-dialect:PoSTGrES") - .run((context) -> { - assertThat(context.getBean(org.jooq.Configuration.class) - .dialect()).isEqualTo(SQLDialect.POSTGRES); + this.contextRunner.withUserConfiguration(JooqDataSourceConfiguration.class) + .withPropertyValues("spring.jooq.sql-dialect:PoSTGrES").run((context) -> { + assertThat(context.getBean(org.jooq.Configuration.class).dialect()) + .isEqualTo(SQLDialect.POSTGRES); }); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ldap/LdapAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ldap/LdapAutoConfigurationTests.java index df2739fc8e..02cc49d197 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ldap/LdapAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ldap/LdapAutoConfigurationTests.java @@ -41,8 +41,8 @@ public class LdapAutoConfigurationTests { public void contextSourceWithDefaultUrl() { this.contextRunner.run(context -> { LdapContextSource contextSource = context.getBean(LdapContextSource.class); - String[] urls = (String[]) ReflectionTestUtils - .getField(contextSource, "urls"); + String[] urls = (String[]) ReflectionTestUtils.getField(contextSource, + "urls"); assertThat(urls).containsExactly("ldap://localhost:389"); assertThat(contextSource.isAnonymousReadOnly()).isFalse(); }); @@ -53,8 +53,8 @@ public class LdapAutoConfigurationTests { this.contextRunner.withPropertyValues("spring.ldap.urls:ldap://localhost:123") .run(context -> { ContextSource contextSource = context.getBean(ContextSource.class); - String[] urls = (String[]) ReflectionTestUtils.getField( - contextSource, "urls"); + String[] urls = (String[]) ReflectionTestUtils.getField(contextSource, + "urls"); assertThat(urls).containsExactly("ldap://localhost:123"); }); } @@ -67,8 +67,8 @@ public class LdapAutoConfigurationTests { .run(context -> { ContextSource contextSource = context.getBean(ContextSource.class); LdapProperties ldapProperties = context.getBean(LdapProperties.class); - String[] urls = (String[]) ReflectionTestUtils.getField( - contextSource, "urls"); + String[] urls = (String[]) ReflectionTestUtils.getField(contextSource, + "urls"); assertThat(urls).containsExactly("ldap://localhost:123", "ldap://mycompany:123"); assertThat(ldapProperties.getUrls()).hasSize(2); @@ -78,21 +78,19 @@ public class LdapAutoConfigurationTests { @Test public void contextSourceWithExtraCustomization() { this.contextRunner - .withPropertyValues( - "spring.ldap.urls:ldap://localhost:123", - "spring.ldap.username:root", - "spring.ldap.password:secret", + .withPropertyValues("spring.ldap.urls:ldap://localhost:123", + "spring.ldap.username:root", "spring.ldap.password:secret", "spring.ldap.anonymous-read-only:true", "spring.ldap.base:cn=SpringDevelopers", "spring.ldap.baseEnvironment.java.naming.security.authentication:DIGEST-MD5") .run(context -> { - LdapContextSource contextSource = context.getBean( - LdapContextSource.class); + LdapContextSource contextSource = context + .getBean(LdapContextSource.class); assertThat(contextSource.getUserDn()).isEqualTo("root"); assertThat(contextSource.getPassword()).isEqualTo("secret"); assertThat(contextSource.isAnonymousReadOnly()).isTrue(); - assertThat(contextSource.getBaseLdapPathAsString()).isEqualTo( - "cn=SpringDevelopers"); + assertThat(contextSource.getBaseLdapPathAsString()) + .isEqualTo("cn=SpringDevelopers"); LdapProperties ldapProperties = context.getBean(LdapProperties.class); assertThat(ldapProperties.getBaseEnvironment()).containsEntry( "java.naming.security.authentication", "DIGEST-MD5"); diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java index f6e18b4a9f..0f0849ca9e 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java @@ -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. diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/RemoteUrlPropertyExtractor.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/RemoteUrlPropertyExtractor.java index 68bbb4a6fd..edd87d44c6 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/RemoteUrlPropertyExtractor.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/RemoteUrlPropertyExtractor.java @@ -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. diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java index 3fdb6c6b03..16606ee09b 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java @@ -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. diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootConfigurationFinder.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootConfigurationFinder.java index c3cbe7f4cc..4dc439dfa9 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootConfigurationFinder.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootConfigurationFinder.java @@ -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. diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/util/EnvironmentTestUtils.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/util/EnvironmentTestUtils.java index 1f2ee45e1b..0d6e87358c 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/util/EnvironmentTestUtils.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/util/EnvironmentTestUtils.java @@ -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. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/javac/JavaCompilerFieldValuesParser.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/javac/JavaCompilerFieldValuesParser.java index 9f77f91611..e95ea97f2f 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/javac/JavaCompilerFieldValuesParser.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/javac/JavaCompilerFieldValuesParser.java @@ -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. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java index 3e8094a1e7..200b418634 100755 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java @@ -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. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/JarFileArchive.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/JarFileArchive.java index 988e17b7d8..d5b0bb9e34 100755 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/JarFileArchive.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/JarFileArchive.java @@ -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. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java index 8971206ddc..c7def2c319 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java @@ -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. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/NoUniqueBeanDefinitionFailureAnalyzer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/NoUniqueBeanDefinitionFailureAnalyzer.java index 13d2151804..7f16a51ff6 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/NoUniqueBeanDefinitionFailureAnalyzer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/diagnostics/analyzer/NoUniqueBeanDefinitionFailureAnalyzer.java @@ -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. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedMapPropertySource.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedMapPropertySource.java index ffa0a1b8e2..7092a93bd4 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedMapPropertySource.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedMapPropertySource.java @@ -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. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/SpringPropertyAction.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/SpringPropertyAction.java index 06534bc086..4a74ab21f8 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/SpringPropertyAction.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/SpringPropertyAction.java @@ -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. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java index 94705fa1b5..26be629d01 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/support/ErrorPageFilter.java @@ -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.