diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportEvent.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportEvent.java index 522d594a05..26a1cec678 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportEvent.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportEvent.java @@ -44,7 +44,7 @@ public class AutoConfigurationImportEvent extends EventObject { /** * Return the auto-configuration candidate configurations that are going to be * imported. - * @return the configurations the auto-configuration candidates + * @return the auto-configuration candidates */ public List getCandidateConfigurations() { return this.candidateConfigurations; @@ -52,7 +52,7 @@ public class AutoConfigurationImportEvent extends EventObject { /** * Return the exclusions that were applied. - * @return the exclusions the exclusions applied + * @return the exclusions applied */ public Set getExclusions() { return this.exclusions; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportFilter.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportFilter.java index 564721c109..ee83eadf4d 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportFilter.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportFilter.java @@ -31,8 +31,8 @@ import org.springframework.context.ResourceLoaderAware; * methods will be called prior to {@link #match}: * * diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportListener.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportListener.java index 223172ab9a..507843b011 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportListener.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportListener.java @@ -33,8 +33,8 @@ import org.springframework.context.ResourceLoaderAware; * {@link #onAutoConfigurationImportEvent(AutoConfigurationImportEvent)}: * * diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java index cb27934cfa..29c7d360ac 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java @@ -99,7 +99,7 @@ public class AutoConfigurationImportSelector checkExcludedClasses(configurations, exclusions); configurations.removeAll(exclusions); configurations = filter(configurations, autoConfigurationMetadata); - fireAutoConfigurationImportListeners(configurations, exclusions); + fireAutoConfigurationImportEvents(configurations, exclusions); return configurations.toArray(new String[configurations.size()]); } catch (IOException ex) { @@ -300,7 +300,7 @@ public class AutoConfigurationImportSelector return Arrays.asList(value == null ? new String[0] : value); } - private void fireAutoConfigurationImportListeners(List configurations, + private void fireAutoConfigurationImportEvents(List configurations, Set exclusions) { List listeners = getAutoConfigurationImportListeners(); if (!listeners.isEmpty()) { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/EnableAutoConfigurationImportSelectorTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/EnableAutoConfigurationImportSelectorTests.java index 218ea0722a..acfae2caef 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/EnableAutoConfigurationImportSelectorTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/EnableAutoConfigurationImportSelectorTests.java @@ -18,7 +18,6 @@ package org.springframework.boot.autoconfigure; import org.junit.Before; import org.junit.Test; -import org.mockito.MockitoAnnotations; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -46,7 +45,6 @@ public class EnableAutoConfigurationImportSelectorTests { @Before public void setup() { - MockitoAnnotations.initMocks(this); this.importSelector.setBeanFactory(this.beanFactory); this.importSelector.setEnvironment(this.environment); this.importSelector.setResourceLoader(new DefaultResourceLoader()); diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index c3a16e508f..998bc3a214 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -2825,7 +2825,7 @@ application's main class to extend `SpringBootServletInitializer`: The next step is to update your build configuration so that your project produces a war file rather than a jar file. If you're using Maven and using `spring-boot-starter-parent` (which -configures Maven's war plugin for you) all you need to do is modify `pom.xml` to change the +configures Maven's war plugin for you) all you need to do is to modify `pom.xml` to change the packaging to war: [source,xml,indent=0,subs="verbatim,quotes,attributes"] diff --git a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 21d1b405f8..428700b8c2 100644 --- a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -1057,7 +1057,7 @@ In addition, any `MetricReader` that you define and mark as `@ExportMetricReader have its values exported by the default exporter. NOTE: This feature is enabling scheduling in your application (`@EnableScheduling`) which -can be a problem if you run an integration tests as your own scheduled tasks will start. +can be a problem if you run an integration test as your own scheduled tasks will start. You can disable this behaviour by setting `spring.metrics.export.enabled` to `false`. The default exporter is a `MetricCopyExporter` which tries to optimize itself by not diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index e334f79709..c7311daa7b 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1091,7 +1091,7 @@ only rely on custom converters qualified with `@ConfigurationPropertiesBinding`. [[boot-features-external-config-validation]] ==== @ConfigurationProperties Validation Spring Boot will attempt to validate `@ConfigurationProperties` classes whenever they -annotated with Spring's `@Validated` annotation. You can use JSR-303 `javax.validation` +are annotated with Spring's `@Validated` annotation. You can use JSR-303 `javax.validation` constraint annotations directly on your configuration class. Simply ensure that a compliant JSR-303 implementation is on your classpath, then add constraint annotations to your fields: @@ -5355,7 +5355,7 @@ more `@AutoConfigure...` annotations that can be used to customize auto-configur settings. NOTE: Each slice loads a very restricted set of auto-configuration classes. If you need to -exclude one of them, most `@...Test` annotation provide an `excludeAutoConfiguration` +exclude one of them, most `@...Test` annotations provide an `excludeAutoConfiguration` attribute. Alternatively, you can use `@ImportAutoConfiguration#exclude`. TIP: It's also possible to use the `@AutoConfigure...` annotations with the standard @@ -5681,7 +5681,7 @@ for `@Document` classes and configure Spring Data MongoDB repositories. Regular In-memory embedded MongoDB generally works well for tests since it is fast and doesn't require any developer installation. If, however, you prefer to run tests against a real -MongoDB server you should exclude the embedded mongodb auto-configuration: +MongoDB server you should exclude the embedded MongoDB auto-configuration: [source,java,indent=0] ---- diff --git a/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc b/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc index 8360e74e37..0539dee4d3 100644 --- a/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc +++ b/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc @@ -1126,7 +1126,7 @@ IDEA suspend the entire VM rather than only suspending the thread that hit the breakpoint. This has the unwanted side-effect of suspending the thread that manages the remote debug tunnel, causing your debugging session to freeze. When using the remote debug tunnel with IntelliJ IDEA, all breakpoints should be configured to suspend the -thread rather than the VM. Please set +thread rather than the VM. Please see https://youtrack.jetbrains.com/issue/IDEA-165769[IDEA-165769] for further details. 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 36589490c8..3a3d12aada 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 @@ -60,7 +60,7 @@ public class DataMongoTestIntegrationTests { } @Test - public void didNotInjectExampleController() { + public void didNotInjectExampleService() { this.thrown.expect(NoSuchBeanDefinitionException.class); this.applicationContext.getBean(ExampleService.class); } 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 80aa264595..1a56ddcd9e 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 @@ -39,7 +39,7 @@ public class DataMongoTestWithIncludeFilterIntegrationTests { private ExampleService service; @Test - public void testRepository() { + public void testService() { assertThat(this.service.hasCollection("foobar")).isFalse(); } 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 aa4610b8b5..43665f40cb 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 @@ -33,7 +33,7 @@ public class ExampleService { this.mongoTemplate = mongoTemplate; } - public boolean hasCollection(final String collectionName) { + public boolean hasCollection(String collectionName) { return this.mongoTemplate.collectionExists(collectionName); } diff --git a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jdbc/TestDatabaseAutoConfigurationTests.java b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jdbc/TestDatabaseAutoConfigurationTests.java index 069310c262..4e8435fc4d 100644 --- a/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jdbc/TestDatabaseAutoConfigurationTests.java +++ b/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jdbc/TestDatabaseAutoConfigurationTests.java @@ -72,11 +72,11 @@ public class TestDatabaseAutoConfigurationTests { } } - public void load(Class config, String... environment) { + private void load(Class config, String... environment) { this.context = doLoad(config, environment); } - public ConfigurableApplicationContext doLoad(Class config, String... environment) { + private ConfigurableApplicationContext doLoad(Class config, String... environment) { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); if (config != null) { ctx.register(config);