diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/EndpointEnablementProviderTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/EndpointEnablementProviderTests.java index 17d11026ba90..8485f8632675 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/EndpointEnablementProviderTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/EndpointEnablementProviderTests.java @@ -153,7 +153,7 @@ public void defaultEnablementNeutralWithGeneralDisablement() { } @Test - public void defaultEnablementNeutralWebWithTechDisablement() { + public void defaultEnablementNeutralJmxWithTechDisablement() { EndpointEnablement enablement = getEndpointEnablement("biz", DefaultEnablement.NEUTRAL, EndpointExposure.JMX, "endpoints.default.jmx.enabled=false"); @@ -177,7 +177,7 @@ public void defaultEnablementNeutralWebWithTechEnablement() { } @Test - public void defaultEnablementNeutralWebWithUnrelatedTechDisablement() { + public void defaultEnablementNeutralJmxWithUnrelatedTechDisablement() { EndpointEnablement enablement = getEndpointEnablement("biz", DefaultEnablement.NEUTRAL, EndpointExposure.JMX, "endpoints.default.web.enabled=false"); @@ -235,20 +235,20 @@ public void defaultEnablementNeutralDefaultTechTakesPrecedenceOnGeneralDefault() } private EndpointEnablement getEndpointEnablement(String id, - DefaultEnablement enabledByDefault, String... environment) { - return getEndpointEnablement(id, enabledByDefault, null, environment); + DefaultEnablement defaultEnablement, String... environment) { + return getEndpointEnablement(id, defaultEnablement, null, environment); } private EndpointEnablement getEndpointEnablement(String id, - DefaultEnablement enabledByDefault, EndpointExposure exposure, + DefaultEnablement defaultEnablement, EndpointExposure exposure, String... environment) { MockEnvironment env = new MockEnvironment(); TestPropertyValues.of(environment).applyTo(env); EndpointEnablementProvider provider = new EndpointEnablementProvider(env); if (exposure != null) { - return provider.getEndpointEnablement(id, enabledByDefault, exposure); + return provider.getEndpointEnablement(id, defaultEnablement, exposure); } - return provider.getEndpointEnablement(id, enabledByDefault); + return provider.getEndpointEnablement(id, defaultEnablement); } private void validate(EndpointEnablement enablement, boolean enabled, diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/health/HealthEndpointAutoConfigurationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/health/HealthEndpointAutoConfigurationTests.java index a5d35c55b7f8..da09d4a08663 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/health/HealthEndpointAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/health/HealthEndpointAutoConfigurationTests.java @@ -89,7 +89,7 @@ public void runShouldHaveStatusEndpointBeanEvenIfDefaultIsDisabled() { } @Test - public void runWhenEnabledPropertyIsFalseShouldNotHaveEndpointBean() + public void runWhenEnabledPropertyIsFalseShouldNotHaveStatusEndpointBean() throws Exception { this.contextRunner.withPropertyValues("endpoints.status.enabled:false").run( (context) -> assertThat(context).doesNotHaveBean(StatusEndpoint.class)); diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointHandlerMapping.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointHandlerMapping.java index 3e616a48388a..aad2c7839364 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointHandlerMapping.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointHandlerMapping.java @@ -103,7 +103,7 @@ public WebFluxEndpointHandlerMapping(EndpointMapping endpointMapping, /** * Creates a new {@code WebEndpointHandlerMapping} that provides mappings for the * operations of the given {@code webEndpoints}. - * @param endpointMapping the path beneath which all endpoints should be mapped + * @param endpointMapping the base mapping for all endpoints * @param webEndpoints the web endpoints * @param corsConfiguration the CORS configuration for the endpoints */ diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/annotation/AnnotationEndpointDiscovererTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/annotation/AnnotationEndpointDiscovererTests.java index 7ad54f0c4c2e..e6906867ae03 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/annotation/AnnotationEndpointDiscovererTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/annotation/AnnotationEndpointDiscovererTests.java @@ -68,7 +68,7 @@ public void endpointIsDiscovered() { } @Test - public void endpointIsInParentContextIsDiscovered() { + public void endpointInParentContextIsDiscovered() { AnnotationConfigApplicationContext parent = new AnnotationConfigApplicationContext( TestEndpointConfiguration.class); loadWithParent(parent, EmptyConfiguration.class, hasTestEndpoint()); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientProperties.java index 4f8a22282ccf..e3e2f6669d07 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientProperties.java @@ -37,12 +37,12 @@ public class OAuth2ClientProperties { /** * OAuth provider details. */ - private Map provider = new HashMap<>(); + private final Map provider = new HashMap<>(); /** * OAuth client registrations. */ - private Map registration = new HashMap<>(); + private final Map registration = new HashMap<>(); public Map getProvider() { return this.provider; @@ -92,28 +92,28 @@ public static class Registration { private String clientSecret; /** - * Client authentication method. May be left bank then using a pre-defined + * Client authentication method. May be left blank then using a pre-defined * provider. */ private String clientAuthenticationMethod; /** - * Authorization grant type. May be left bank then using a pre-defined provider. + * Authorization grant type. May be left blank then using a pre-defined provider. */ private String authorizationGrantType; /** - * Redirect URI. May be left bank then using a pre-defined provider. + * Redirect URI. May be left blank then using a pre-defined provider. */ private String redirectUri; /** - * Authorization scopes. May be left bank then using a pre-defined provider. + * Authorization scopes. May be left blank then using a pre-defined provider. */ private Set scope; /** - * Client name. May be left bank then using a pre-defined provider. + * Client name. May be left blank then using a pre-defined provider. */ private String clientName; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/NonUniqueSessionRepositoryFailureAnalyzer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/NonUniqueSessionRepositoryFailureAnalyzer.java index 7bf8b9d3ae5f..3f993ef4860d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/NonUniqueSessionRepositoryFailureAnalyzer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/NonUniqueSessionRepositoryFailureAnalyzer.java @@ -20,7 +20,7 @@ import org.springframework.boot.diagnostics.FailureAnalysis; /** - * A {@link AbstractFailureAnalyzer} for {@link NonUniqueSessionRepositoryException}. + * An {@link AbstractFailureAnalyzer} for {@link NonUniqueSessionRepositoryException}. * * @author Stephane Nicoll */ diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJmxConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJmxConfigurationTests.java index f6e5d2b6fe08..656d0809414d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJmxConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJmxConfigurationTests.java @@ -29,9 +29,7 @@ import org.apache.tomcat.jdbc.pool.DataSourceProxy; import org.apache.tomcat.jdbc.pool.jmx.ConnectionPool; import org.junit.After; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration; import org.springframework.boot.test.util.TestPropertyValues; @@ -47,9 +45,6 @@ */ public class DataSourceJmxConfigurationTests { - @Rule - public ExpectedException thrown = ExpectedException.none(); - private ConfigurableApplicationContext context; @After diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoClientFactoryTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoClientFactoryTests.java index dd437ddca604..64b1a75e1d07 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoClientFactoryTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoClientFactoryTests.java @@ -23,9 +23,7 @@ import com.mongodb.ServerAddress; import com.mongodb.connection.Cluster; import com.mongodb.connection.ClusterSettings; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; @@ -45,9 +43,6 @@ */ public class MongoClientFactoryTests { - @Rule - public ExpectedException thrown = ExpectedException.none(); - private MockEnvironment environment = new MockEnvironment(); @Test diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java index 3269747f7747..3f03339c3f12 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java @@ -48,7 +48,7 @@ public void getClientRegistrationsWhenUsingDefinedProviderShouldAdapt() provider.setAuthorizationUri("http://example.com/auth"); provider.setTokenUri("http://example.com/token"); provider.setUserInfoUri("http://example.com/info"); - provider.setJwkSetUri("http://example.com/jkw"); + provider.setJwkSetUri("http://example.com/jwk"); Registration registration = new Registration(); registration.setProvider("provider"); registration.setClientId("clientId"); @@ -69,7 +69,7 @@ public void getClientRegistrationsWhenUsingDefinedProviderShouldAdapt() assertThat(adaptedProvider.getTokenUri()).isEqualTo("http://example.com/token"); assertThat(adaptedProvider.getUserInfoEndpoint().getUri()) .isEqualTo("http://example.com/info"); - assertThat(adaptedProvider.getJwkSetUri()).isEqualTo("http://example.com/jkw"); + assertThat(adaptedProvider.getJwkSetUri()).isEqualTo("http://example.com/jwk"); assertThat(adapted.getRegistrationId()).isEqualTo("registration"); assertThat(adapted.getClientId()).isEqualTo("clientId"); assertThat(adapted.getClientSecret()).isEqualTo("clientSecret"); diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/documentation-overview.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/documentation-overview.adoc index a2d94672f37c..ad66c1e156b4 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/documentation-overview.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/documentation-overview.adoc @@ -123,7 +123,7 @@ When you're ready to push your Spring Boot application to production, we've got <> * *Connection options:* <> | -<> | +<> * *Monitoring:* <> | <> | diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/getting-started.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/getting-started.adoc index 44ab1bc6c63b..e67052396d9e 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/getting-started.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/getting-started.adoc @@ -252,7 +252,7 @@ endif::[] [[getting-started-installing-the-cli]] === Installing the Spring Boot CLI The Spring Boot CLI is a command line tool that can be used if you want to quickly -prototype with Spring. It allows you to run http://groovy.codehaus.org/[Groovy] scripts, +prototype with Spring. It allows you to run http://groovy-lang.org/[Groovy] scripts, which means that you have a familiar Java-like syntax, without so much boilerplate code. You don't need to use the CLI to work with Spring Boot but it's definitely the quickest diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 1c1dcddddf36..c924762a37e1 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -580,7 +580,7 @@ The `application.properties` example above will change the endpoint from `/appli NOTE: Unless the management port has been configured to <>, `management.context-path` is relative to `server.context-path`. +HTTP port>>, `management.context-path` is relative to `server.servlet.context-path`. diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/ApplicationContextRunner.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/ApplicationContextRunner.java index 52278569b973..4b040e1ee8da 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/ApplicationContextRunner.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/ApplicationContextRunner.java @@ -27,7 +27,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext; /** - * A {@link AbstractApplicationContextRunner ApplicationContext runner} for a standard, + * An {@link AbstractApplicationContextRunner ApplicationContext runner} for a standard, * non-web environment {@link ConfigurableApplicationContext}. *

* See {@link AbstractApplicationContextRunner} for details. diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/ReactiveWebApplicationContextRunner.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/ReactiveWebApplicationContextRunner.java index 431682e2f5c0..0513cbe9696b 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/ReactiveWebApplicationContextRunner.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/ReactiveWebApplicationContextRunner.java @@ -27,7 +27,7 @@ import org.springframework.context.ApplicationContext; /** - * A {@link AbstractApplicationContextRunner ApplicationContext runner} for a + * An {@link AbstractApplicationContextRunner ApplicationContext runner} for a * {@link ConfigurableReactiveWebApplicationContext}. *

* See {@link AbstractApplicationContextRunner} for details. diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/WebApplicationContextRunner.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/WebApplicationContextRunner.java index beb245bb2de5..fd9270b4ae63 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/WebApplicationContextRunner.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/runner/WebApplicationContextRunner.java @@ -29,7 +29,7 @@ import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; /** - * A {@link AbstractApplicationContextRunner ApplicationContext runner} for a Servlet + * An {@link AbstractApplicationContextRunner ApplicationContext runner} for a Servlet * based {@link ConfigurableWebApplicationContext}. *

* See {@link AbstractApplicationContextRunner} for details. diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java index 7d877d18b370..60973dd3eebb 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java @@ -74,7 +74,6 @@ public void hasBeanWhenHasNoBeanShouldFail() { @Test public void hasBeanWhenNotStartedShouldFail() { this.thrown.expect(AssertionError.class); - this.thrown.expectMessage("failed to start"); this.thrown.expectMessage(String .format("but context failed to start:%n java.lang.RuntimeException")); assertThat(getAssert(this.failure)).hasBean("foo"); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/EnabledEndpoint.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/EnabledEndpoint.java index 58a38ccbf524..f279ed44f1c3 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/EnabledEndpoint.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/EnabledEndpoint.java @@ -20,7 +20,7 @@ import org.springframework.boot.configurationsample.Endpoint; /** - * An endpoint that is enabled unless configured explicitly.. + * An endpoint that is enabled unless configured explicitly. * * @author Stephane Nicoll */ diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/UnresolvedDependenciesAnalyzer.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/UnresolvedDependenciesAnalyzer.java index 22163aee8953..930f32d93fc5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/UnresolvedDependenciesAnalyzer.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/UnresolvedDependenciesAnalyzer.java @@ -52,7 +52,7 @@ void buildFinished(Project project) { StringBuilder message = new StringBuilder(); message.append("\nDuring the build, one or more dependencies that were " + "declared without a version failed to resolve:\n"); - this.dependenciesWithNoVersion.stream() + this.dependenciesWithNoVersion .forEach((dependency) -> message.append(" " + dependency + "\n")); message.append("\nDid you forget to apply the " + "io.spring.dependency-management plugin to the " + project.getName()