diff --git a/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/EndpointDocumentation.java b/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/EndpointDocumentation.java index e2be9108359..d8ccf9aafec 100644 --- a/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/EndpointDocumentation.java +++ b/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/EndpointDocumentation.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-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HealthEndpointDocumentation.java b/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HealthEndpointDocumentation.java index 5562034eeb0..7f7601ab46f 100644 --- a/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HealthEndpointDocumentation.java +++ b/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HealthEndpointDocumentation.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-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HypermediaEndpointDocumentation.java b/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HypermediaEndpointDocumentation.java index efb216af335..224a8acb718 100644 --- a/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HypermediaEndpointDocumentation.java +++ b/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HypermediaEndpointDocumentation.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-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.java index a1a831efc61..f47155dfd7a 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.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. @@ -240,18 +240,22 @@ public class EndpointWebMvcHypermediaManagementContextConfiguration { for (RequestMappingHandlerAdapter handlerAdapter : this.handlerAdapters) { for (HttpMessageConverter messageConverter : handlerAdapter .getMessageConverters()) { - if (messageConverter instanceof TypeConstrainedMappingJackson2HttpMessageConverter) { - List supportedMediaTypes = new ArrayList( - messageConverter.getSupportedMediaTypes()); - supportedMediaTypes - .add(ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON); - ((AbstractHttpMessageConverter) messageConverter) - .setSupportedMediaTypes(supportedMediaTypes); - } + configureHttpMessageConverter(messageConverter); } } } + private void configureHttpMessageConverter( + HttpMessageConverter messageConverter) { + if (messageConverter instanceof TypeConstrainedMappingJackson2HttpMessageConverter) { + List supportedMediaTypes = new ArrayList( + messageConverter.getSupportedMediaTypes()); + supportedMediaTypes.add(ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON); + ((AbstractHttpMessageConverter) messageConverter) + .setSupportedMediaTypes(supportedMediaTypes); + } + } + @Override public boolean supports(MethodParameter returnType, Class> converterType) { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorGetMapping.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorGetMapping.java index 1b9109214ed..8f534e8076d 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorGetMapping.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorGetMapping.java @@ -44,7 +44,6 @@ import org.springframework.web.bind.annotation.RequestMethod; /** * Alias for {@link RequestMapping#value}. - * * @return the value */ @AliasFor(annotation = RequestMapping.class) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorMediaTypes.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorMediaTypes.java index 9e43c5b9b89..5018921a648 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorMediaTypes.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorMediaTypes.java @@ -22,6 +22,7 @@ import org.springframework.http.MediaType; * {@link MediaType MediaTypes} that can be consumed and produced by Actuator endpoints. * * @author Andy Wilkinson + * @since 1.5.0 */ public final class ActuatorMediaTypes { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorPostMapping.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorPostMapping.java index d45f33d1a5a..4ec79ed7937 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorPostMapping.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorPostMapping.java @@ -48,7 +48,6 @@ import org.springframework.web.bind.annotation.RequestMethod; /** * Alias for {@link RequestMapping#value}. - * * @return the value */ @AliasFor(annotation = RequestMapping.class) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpoint.java index 9c15b55117b..ab2d42aff63 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpoint.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-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java index 06677f393b6..910b029dd51 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.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/hateoas/HypermediaHttpMessageConverterConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HypermediaHttpMessageConverterConfiguration.java index 42c3790a29b..2b61ee36bd2 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HypermediaHttpMessageConverterConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HypermediaHttpMessageConverterConfiguration.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. @@ -17,9 +17,8 @@ package org.springframework.boot.autoconfigure.hateoas; import java.util.ArrayList; +import java.util.Collection; import java.util.List; -import java.util.Map; -import java.util.Map.Entry; import javax.annotation.PostConstruct; @@ -63,31 +62,35 @@ public class HypermediaHttpMessageConverterConfiguration { private volatile BeanFactory beanFactory; @PostConstruct - public void customizedSupportedMediaTypes() { + public void configureHttpMessageConverters() { if (this.beanFactory instanceof ListableBeanFactory) { - Map handlerAdapters = ((ListableBeanFactory) this.beanFactory) - .getBeansOfType(RequestMappingHandlerAdapter.class); - for (Entry entry : handlerAdapters - .entrySet()) { - RequestMappingHandlerAdapter handlerAdapter = entry.getValue(); - for (HttpMessageConverter converter : handlerAdapter - .getMessageConverters()) { - if (converter instanceof TypeConstrainedMappingJackson2HttpMessageConverter) { - List supportedMediaTypes = new ArrayList( - converter.getSupportedMediaTypes()); - if (!supportedMediaTypes - .contains(MediaType.APPLICATION_JSON)) { - supportedMediaTypes.add(MediaType.APPLICATION_JSON); - } - ((AbstractHttpMessageConverter) converter) - .setSupportedMediaTypes(supportedMediaTypes); - } - } + configureHttpMessageConverters(((ListableBeanFactory) this.beanFactory) + .getBeansOfType(RequestMappingHandlerAdapter.class).values()); + } + } + private void configureHttpMessageConverters( + Collection handlerAdapters) { + for (RequestMappingHandlerAdapter handlerAdapter : handlerAdapters) { + for (HttpMessageConverter messageConverter : handlerAdapter + .getMessageConverters()) { + configureHttpMessageConverter(messageConverter); } } } + private void configureHttpMessageConverter(HttpMessageConverter converter) { + if (converter instanceof TypeConstrainedMappingJackson2HttpMessageConverter) { + List supportedMediaTypes = new ArrayList( + converter.getSupportedMediaTypes()); + if (!supportedMediaTypes.contains(MediaType.APPLICATION_JSON)) { + supportedMediaTypes.add(MediaType.APPLICATION_JSON); + } + ((AbstractHttpMessageConverter) converter) + .setSupportedMediaTypes(supportedMediaTypes); + } + } + @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java index f1a069d24b4..ff00e3402b1 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java @@ -82,8 +82,8 @@ public class EmbeddedMongoAutoConfigurationTests { load(); assertThat(this.context.getBeansOfType(MongoClient.class)).hasSize(1); MongoClient client = this.context.getBean(MongoClient.class); - Integer mongoPort = Integer.valueOf( - this.context.getEnvironment().getProperty("local.mongo.port")); + Integer mongoPort = Integer + .valueOf(this.context.getEnvironment().getProperty("local.mongo.port")); assertThat(client.getAddress().getPort()).isEqualTo(mongoPort); } @@ -92,8 +92,8 @@ public class EmbeddedMongoAutoConfigurationTests { load("spring.data.mongodb.port=0"); assertThat(this.context.getBeansOfType(MongoClient.class)).hasSize(1); MongoClient client = this.context.getBean(MongoClient.class); - Integer mongoPort = Integer.valueOf( - this.context.getEnvironment().getProperty("local.mongo.port")); + Integer mongoPort = Integer + .valueOf(this.context.getEnvironment().getProperty("local.mongo.port")); assertThat(client.getAddress().getPort()).isEqualTo(mongoPort); } @@ -101,8 +101,8 @@ public class EmbeddedMongoAutoConfigurationTests { public void randomlyAllocatedPortIsAvailableWhenCreatingMongoClient() { load(MongoClientConfiguration.class); MongoClient client = this.context.getBean(MongoClient.class); - Integer mongoPort = Integer.valueOf( - this.context.getEnvironment().getProperty("local.mongo.port")); + Integer mongoPort = Integer + .valueOf(this.context.getEnvironment().getProperty("local.mongo.port")); assertThat(client.getAddress().getPort()).isEqualTo(mongoPort); } @@ -187,8 +187,7 @@ public class EmbeddedMongoAutoConfigurationTests { ctx.register(config); } EnvironmentTestUtils.addEnvironment(ctx, environment); - ctx.register(EmbeddedMongoAutoConfiguration.class, - MongoAutoConfiguration.class, + ctx.register(EmbeddedMongoAutoConfiguration.class, MongoAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class); ctx.refresh(); this.context = ctx; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java index c8e4ede3b84..f9df7a8314c 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.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-samples/spring-boot-sample-data-mongodb/src/main/java/sample/data/mongo/CustomerRepository.java b/spring-boot-samples/spring-boot-sample-data-mongodb/src/main/java/sample/data/mongo/CustomerRepository.java index 2243a183c59..59092b273de 100644 --- a/spring-boot-samples/spring-boot-sample-data-mongodb/src/main/java/sample/data/mongo/CustomerRepository.java +++ b/spring-boot-samples/spring-boot-sample-data-mongodb/src/main/java/sample/data/mongo/CustomerRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 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-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/AutoConfigureDataMongo.java b/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/AutoConfigureDataMongo.java index 6db6772dee6..63e9a62b929 100644 --- a/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/AutoConfigureDataMongo.java +++ b/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/AutoConfigureDataMongo.java @@ -30,7 +30,7 @@ import org.springframework.boot.autoconfigure.ImportAutoConfiguration; * tests. Most tests should consider using {@link DataMongoTest @DataMongoTest} rather * than using this annotation directly. * - * @author Michael J. Simons + * @author Michael Simons * @since 1.5.0 * @see DataMongoTest */ @@ -40,4 +40,5 @@ import org.springframework.boot.autoconfigure.ImportAutoConfiguration; @Inherited @ImportAutoConfiguration public @interface AutoConfigureDataMongo { + } diff --git a/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTest.java b/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTest.java index 9aba52c9a96..cb3544a8369 100644 --- a/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTest.java +++ b/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTest.java @@ -35,8 +35,8 @@ import org.springframework.test.context.BootstrapWith; /** * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical MongoDB test. Can be used when a test focuses - * only on MongoDB components. + * for a typical MongoDB test. Can be used when a test focuses only on + * MongoDB components. *

* Using this annotation will disable full auto-configuration and instead apply only * configuration relevant to MongoDB tests. @@ -44,7 +44,7 @@ import org.springframework.test.context.BootstrapWith; * By default, tests annotated with {@code @DataMongoTest} will use an embedded in-memory * MongoDB process (if available). * - * @author Michael J. Simons + * @author Michael Simons * @author Stephane Nicoll * @since 1.5.0 */ @@ -62,9 +62,8 @@ public @interface DataMongoTest { /** * Determines if default filtering should be used with - * {@link SpringBootApplication @SpringBootApplication}. By default no beans - * are included. - * + * {@link SpringBootApplication @SpringBootApplication}. By default no beans are + * included. * @see #includeFilters() * @see #excludeFilters() * @return if default filters should be used @@ -72,17 +71,15 @@ public @interface DataMongoTest { boolean useDefaultFilters() default true; /** - * A set of include filters which can be used to add otherwise filtered - * beans to the application context. - * + * A set of include filters which can be used to add otherwise filtered beans to the + * application context. * @return include filters to apply */ Filter[] includeFilters() default {}; /** - * A set of exclude filters which can be used to filter beans that would - * otherwise be added to the application context. - * + * A set of exclude filters which can be used to filter beans that would otherwise be + * added to the application context. * @return exclude filters to apply */ Filter[] excludeFilters() default {}; @@ -93,4 +90,5 @@ public @interface DataMongoTest { */ @AliasFor(annotation = ImportAutoConfiguration.class, attribute = "exclude") Class[] excludeAutoConfiguration() default {}; + } diff --git a/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTypeExcludeFilter.java b/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTypeExcludeFilter.java index 65e0afd26bb..e08d29d3560 100644 --- a/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTypeExcludeFilter.java +++ b/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTypeExcludeFilter.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. @@ -30,7 +30,7 @@ import org.springframework.core.type.classreading.MetadataReaderFactory; /** * {@link TypeExcludeFilter} for {@link DataMongoTest @DataMongoTest}. * - * @author Michael J. Simons + * @author Michael Simons */ class DataMongoTypeExcludeFilter extends AnnotationCustomizableTypeExcludeFilter { @@ -49,12 +49,12 @@ class DataMongoTypeExcludeFilter extends AnnotationCustomizableTypeExcludeFilter @Override protected Filter[] getFilters(final FilterType type) { switch (type) { - case INCLUDE: - return this.annotation.includeFilters(); - case EXCLUDE: - return this.annotation.excludeFilters(); - default: - throw new IllegalStateException("Unsupported type " + type); + case INCLUDE: + return this.annotation.includeFilters(); + case EXCLUDE: + return this.annotation.excludeFilters(); + default: + throw new IllegalStateException("Unsupported type " + type); } } diff --git a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestIntegrationTests.java b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestIntegrationTests.java index ee6f7a3fcd9..36589490c87 100644 --- a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestIntegrationTests.java +++ b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestIntegrationTests.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. @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; /** * Sample test for {@link DataMongoTest @DataMongoTest} * - * @author Michael J. Simons + * @author Michael Simons */ @RunWith(SpringRunner.class) @DataMongoTest @@ -54,10 +54,8 @@ public class DataMongoTestIntegrationTests { public void testRepository() { ExampleDocument exampleDocument = new ExampleDocument(); exampleDocument.setText("Look, new @DataMongoTest!"); - exampleDocument = this.exampleRepository.save(exampleDocument); assertThat(exampleDocument.getId()).isNotNull(); - assertThat(this.mongoTemplate.collectionExists("exampleDocuments")).isTrue(); } diff --git a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestWithIncludeFilterIntegrationTests.java b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestWithIncludeFilterIntegrationTests.java index 53a4e6666b0..80aa2645955 100644 --- a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestWithIncludeFilterIntegrationTests.java +++ b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestWithIncludeFilterIntegrationTests.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. @@ -29,7 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat; /** * Integration test with custom include filter for {@link DataMongoTest}. * - * @author Michael J. Simons + * @author Michael Simons */ @RunWith(SpringRunner.class) @DataMongoTest(includeFilters = @Filter(Service.class)) diff --git a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleDocument.java b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleDocument.java index 1f9d2e8777b..f0c65eb4ea9 100644 --- a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleDocument.java +++ b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleDocument.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. @@ -21,7 +21,7 @@ import org.springframework.data.mongodb.core.mapping.Document; /** * Example document used with {@link DataMongoTest} tests. * - * @author Michael J. Simons + * @author Michael Simons */ @Document(collection = "exampleDocuments") public class ExampleDocument { diff --git a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleMongoApplication.java b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleMongoApplication.java index 3d6960701f4..4d6706dbae4 100644 --- a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleMongoApplication.java +++ b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleMongoApplication.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. @@ -21,7 +21,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; /** * Example {@link SpringBootApplication} used with {@link DataMongoTest} tests. * - * @author Michael J. Simons + * @author Michael Simons */ @SpringBootApplication public class ExampleMongoApplication { diff --git a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleRepository.java b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleRepository.java index db3337186fa..9d90eb25844 100644 --- a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleRepository.java +++ b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleRepository.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. @@ -21,7 +21,8 @@ import org.springframework.data.mongodb.repository.MongoRepository; /** * Example repository used with {@link DataMongoTest} tests. * - * @author Michael J. Simons + * @author Michael Simons */ public interface ExampleRepository extends MongoRepository { + } diff --git a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleService.java b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleService.java index c315b5f5039..aa4610b8b5e 100644 --- a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleService.java +++ b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleService.java @@ -22,10 +22,11 @@ import org.springframework.stereotype.Service; /** * Example service used with {@link DataMongoTest} tests. * - * @author Michael J. Simons + * @author Michael Simons */ @Service public class ExampleService { + private final MongoTemplate mongoTemplate; public ExampleService(MongoTemplate mongoTemplate) { diff --git a/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java index 46dec388151..caca89d19d7 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.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/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java b/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java index 3d67ce69344..7ccd17c0522 100644 --- a/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.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.