diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/DefaultEndpointPathResolver.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/DefaultEndpointPathResolver.java index 03ea2bb7854..0c676bf55d7 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/DefaultEndpointPathResolver.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/DefaultEndpointPathResolver.java @@ -22,8 +22,8 @@ import org.springframework.boot.actuate.endpoint.web.EndpointPathResolver; import org.springframework.core.env.Environment; /** - * Default {@link EndpointPathResolver} implementation that use the {@link Environment} to - * determine if an endpoint has a custom path. + * Default {@link EndpointPathResolver} implementation that uses the {@link Environment} + * to determine if an endpoint has a custom path. * * @author Stephane Nicoll */ diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java index 46bad2457d9..aa2f2d18ff9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java @@ -63,7 +63,7 @@ public class ThymeleafProperties { private String suffix = DEFAULT_SUFFIX; /** - * Template mode to be applied to templates. See also Thymleaf's TemplateMode enum. + * Template mode to be applied to templates. See also Thymeleaf's TemplateMode enum. */ private String mode = "HTML"; 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 64b1a75e1d0..1c55322eb17 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 @@ -136,8 +136,7 @@ public class MongoClientFactoryTests { Cluster cluster = (Cluster) ReflectionTestUtils.getField(client, "cluster"); ClusterSettings clusterSettings = (ClusterSettings) ReflectionTestUtils .getField(cluster, "settings"); - List allAddresses = clusterSettings.getHosts(); - return allAddresses; + return clusterSettings.getHosts(); } private void assertServerAddress(ServerAddress serverAddress, String expectedHost, diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoPropertiesTests.java index 7fea2f3d04c..304d996fdf7 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoPropertiesTests.java @@ -163,8 +163,7 @@ public class MongoPropertiesTests { Cluster cluster = (Cluster) ReflectionTestUtils.getField(client, "cluster"); ClusterSettings clusterSettings = (ClusterSettings) ReflectionTestUtils .getField(cluster, "settings"); - List allAddresses = clusterSettings.getHosts(); - return allAddresses; + return clusterSettings.getHosts(); } private void assertServerAddress(ServerAddress serverAddress, String expectedHost, diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java index aa7871761e5..e211887e2a8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/ReactiveMongoClientFactoryTests.java @@ -175,8 +175,7 @@ public class ReactiveMongoClientFactoryTests { private List extractServerAddresses(MongoClient client) { MongoClientSettings settings = client.getSettings(); ClusterSettings clusterSettings = settings.getClusterSettings(); - List allAddresses = clusterSettings.getHosts(); - return allAddresses; + return clusterSettings.getHosts(); } private List extractMongoCredentials(MongoClient client) { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ResourcePropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ResourcePropertiesTests.java index 85b6aeee615..5a3a0da9771 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ResourcePropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ResourcePropertiesTests.java @@ -18,9 +18,7 @@ package org.springframework.boot.autoconfigure.web; import java.time.Duration; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.springframework.boot.autoconfigure.web.ResourceProperties.Cache; import org.springframework.boot.testsupport.assertj.Matched; @@ -39,9 +37,6 @@ public class ResourcePropertiesTests { private final ResourceProperties properties = new ResourceProperties(); - @Rule - public ExpectedException thrown = ExpectedException.none(); - @Test public void resourceChainNoCustomization() { assertThat(this.properties.getChain().getEnabled()).isNull(); diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 61d0942264a..04c75360b67 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -469,7 +469,7 @@ content into your application. Rather, pick only the properties that you need. spring.thymeleaf.enable-spring-el-compiler=false # Enable the SpringEL compiler in SpringEL expressions. spring.thymeleaf.encoding=UTF-8 # Template files encoding. spring.thymeleaf.excluded-view-names= # Comma-separated list of view names that should be excluded from resolution. - spring.thymeleaf.mode=HTML5 # Template mode to be applied to templates. See also Thymleaf's TemplateMode enum. + spring.thymeleaf.mode=HTML5 # Template mode to be applied to templates. See also Thymeleaf's TemplateMode enum. spring.thymeleaf.prefix=classpath:/templates/ # Prefix that gets prepended to view names when building a URL. spring.thymeleaf.reactive.chunked-mode-view-names= # Comma-separated list of view names (patterns allowed) that should be the only ones executed in CHUNKED mode when a max chunk size is set. spring.thymeleaf.reactive.full-mode-view-names= # Comma-separated list of view names (patterns allowed) that should be executed in FULL mode even if a max chunk size is set. 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 e93c801b194..e3fcc61e74d 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 @@ -183,7 +183,7 @@ register an `EndpointFilter` bean. === Securing HTTP Endpoints You should take care to secure HTTP endpoints in the same way that you would any other sensitive URL. Spring Boot will not apply any security on your behalf, however, it does -provide some convenient `RequestMatcher`s that can be used in combination with Spring +provide some convenient ``RequestMatcher``s that can be used in combination with Spring Security. A typical Spring Security configuration could look something like this: diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-cli.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-cli.adoc index 40525e148c1..170883019df 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-cli.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-cli.adoc @@ -132,7 +132,7 @@ Maven or Gradle would but without requiring you to use a build tool. Spring Boot extends this technique further and tries to deduce which libraries to "`grab`" based on your code. For example, since the `WebApplication` code shown previously uses -`@RestController` annotations, Spring Boot grabs"`Tomcat`" and "`Spring MVC`". +`@RestController` annotations, Spring Boot grabs "Tomcat" and "Spring MVC". The following items are used as "`grab hints`": @@ -254,7 +254,7 @@ line: [source,java,indent=0] ---- -`@DependencyManagementBom('io.spring.platform:platform-bom:1.1.2.RELEASE')`. +@DependencyManagementBom('io.spring.platform:platform-bom:1.1.2.RELEASE') ---- diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 7e852c54730..40ddac7db3e 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1596,8 +1596,8 @@ configuration (for example, `logback-spring.xml` rather than `logback.xml`). If standard configuration locations, Spring cannot completely control log initialization. WARNING: There are known classloading issues with Java Util Logging that cause problems -when running from an '`executable jar`'. We recommend that you avoid it when running from -an '`executable jar`'if at all possible. +when running from an 'executable jar'. We recommend that you avoid it when running from +an 'executable jar' if at all possible. To help with the customization, some other properties are transferred from the Spring `Environment` to System properties, as described in the following table: @@ -5949,7 +5949,7 @@ To test that object JSON serialization and deserialization is working as expecte use the `@JsonTest` annotation. `@JsonTest` auto-configures the available supported JSON mapper, which can be one of the following libraries: -* Jackson `ObjectMapper`, any `@JsonComponent` beans and any Jackson `Modules` +* Jackson `ObjectMapper`, any `@JsonComponent` beans and any Jackson ``Module``s * `Gson` * `Jsonb` @@ -6215,7 +6215,7 @@ bean, which provides an alternative to the standard JPA `EntityManager` that is specifically designed for tests. If you want to use `TestEntityManager` outside of `@DataJpaTest` instances, you can also use the `@AutoConfigureTestEntityManager` annotation. A `JdbcTemplate` is also available if you need that. The following example -shows the `@DataJpaTest`annotation in use: +shows the `@DataJpaTest` annotation in use: [source,java,indent=0] ---- diff --git a/spring-boot-project/spring-boot-parent/pom.xml b/spring-boot-project/spring-boot-parent/pom.xml index 39fd21360f8..5815ed0a563 100644 --- a/spring-boot-project/spring-boot-parent/pom.xml +++ b/spring-boot-project/spring-boot-parent/pom.xml @@ -14,7 +14,7 @@ Spring Boot Parent Pivotal Software, Inc. - http://www.spring.io + https://spring.io ${basedir}/../.. diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationTemp.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationTemp.java index c1b717629f7..ade842fcf86 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationTemp.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationTemp.java @@ -90,7 +90,7 @@ public class ApplicationTemp { String property = System.getProperty("java.io.tmpdir"); Assert.state(StringUtils.hasLength(property), "No 'java.io.tmpdir' property set"); File file = new File(property); - Assert.state(file.exists(), () -> "Temp directory" + file + " does not exist"); + Assert.state(file.exists(), () -> "Temp directory " + file + " does not exist"); Assert.state(file.isDirectory(), () -> "Temp location " + file + " is not a directory"); return file; diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java index b3669488bc6..cafa281cba9 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java @@ -784,7 +784,7 @@ public class SpringApplicationTests { SpringApplication application = new SpringApplication(ExampleConfig.class, ListenerConfig.class); application.setApplicationContextClass(SpyApplicationContext.class); - final LinkedHashSet events = new LinkedHashSet<>(); + Set events = new LinkedHashSet<>(); application.addListeners((ApplicationListener) events::add); this.context = application.run(); assertThat(events).hasAtLeastOneElementOfType(ApplicationPreparedEvent.class); @@ -797,7 +797,7 @@ public class SpringApplicationTests { SpringApplication application = new SpringApplication(ExampleConfig.class, ListenerConfig.class, Multicaster.class); application.setApplicationContextClass(SpyApplicationContext.class); - final LinkedHashSet events = new LinkedHashSet<>(); + Set events = new LinkedHashSet<>(); application.addListeners((ApplicationListener) events::add); this.context = application.run(); assertThat(events).hasAtLeastOneElementOfType(ApplicationPreparedEvent.class);