From 303015ea2d336379a386baf38ab3c9cd3806b672 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Sat, 7 Oct 2023 14:05:47 +0900 Subject: [PATCH 1/2] Polish See gh-37745 --- .../boot/autoconfigure/codec/CodecProperties.java | 2 +- .../boot/autoconfigure/graphql/GraphQlProperties.java | 2 +- .../boot/autoconfigure/hateoas/HateoasProperties.java | 2 +- .../boot/autoconfigure/rsocket/RSocketProperties.java | 2 +- .../autoconfigure/web/reactive/WebFluxProperties.java | 2 +- .../boot/autoconfigure/web/servlet/WebMvcProperties.java | 2 +- .../boot/cli/command/init/InitCommandTests.java | 6 +++--- .../src/docs/asciidoc/features/testing.adoc | 8 ++++---- .../spring-boot-docs/src/docs/asciidoc/web/servlet.adoc | 2 +- .../boot/maven/DependencyFilterMojoTests.java | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/codec/CodecProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/codec/CodecProperties.java index 692b8bb817..b63034b9d4 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/codec/CodecProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/codec/CodecProperties.java @@ -20,7 +20,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.util.unit.DataSize; /** - * {@link ConfigurationProperties properties} for reactive codecs. + * {@link ConfigurationProperties Properties} for reactive codecs. * * @author Brian Clozel * @since 2.2.1 diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlProperties.java index 1ea766a8be..13bb71c85f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlProperties.java @@ -22,7 +22,7 @@ import java.util.Arrays; import org.springframework.boot.context.properties.ConfigurationProperties; /** - * {@link ConfigurationProperties properties} for Spring GraphQL. + * {@link ConfigurationProperties Properties} for Spring GraphQL. * * @author Brian Clozel * @since 2.7.0 diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HateoasProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HateoasProperties.java index e6ca03f24e..b0f369a8a4 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HateoasProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HateoasProperties.java @@ -19,7 +19,7 @@ package org.springframework.boot.autoconfigure.hateoas; import org.springframework.boot.context.properties.ConfigurationProperties; /** - * {@link ConfigurationProperties properties} for Spring HATEOAS. + * {@link ConfigurationProperties Properties} for Spring HATEOAS. * * @author Phillip Webb * @author Andy Wilkinson diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketProperties.java index f1921f2388..235e37eb8b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketProperties.java @@ -25,7 +25,7 @@ import org.springframework.boot.web.server.Ssl; import org.springframework.util.unit.DataSize; /** - * {@link ConfigurationProperties properties} for RSocket support. + * {@link ConfigurationProperties Properties} for RSocket support. * * @author Brian Clozel * @author Chris Bono diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxProperties.java index b8f962a736..58c556a2d9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxProperties.java @@ -21,7 +21,7 @@ import org.springframework.boot.context.properties.DeprecatedConfigurationProper import org.springframework.util.StringUtils; /** - * {@link ConfigurationProperties properties} for Spring WebFlux. + * {@link ConfigurationProperties Properties} for Spring WebFlux. * * @author Brian Clozel * @since 2.0.0 diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcProperties.java index c2f8f0ef3d..d4b02f20e4 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcProperties.java @@ -28,7 +28,7 @@ import org.springframework.util.Assert; import org.springframework.validation.DefaultMessageCodesResolver; /** - * {@link ConfigurationProperties properties} for Spring MVC. + * {@link ConfigurationProperties Properties} for Spring MVC. * * @author Phillip Webb * @author Sébastien Deleuze diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java index 37c3280afd..1ac18747b8 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java @@ -82,7 +82,7 @@ class InitCommandTests extends AbstractHttpClientMockTests { @Test void generateProject() throws Exception { - String fileName = UUID.randomUUID().toString() + ".zip"; + String fileName = UUID.randomUUID() + ".zip"; File file = new File(fileName); assertThat(file.exists()).as("file should not exist").isFalse(); MockHttpProjectGenerationRequest request = new MockHttpProjectGenerationRequest("application/zip", fileName); @@ -177,7 +177,7 @@ class InitCommandTests extends AbstractHttpClientMockTests { @Test void generateProjectAndExtractUnsupportedArchive(@TempDir File tempDir) throws Exception { - String fileName = UUID.randomUUID().toString() + ".zip"; + String fileName = UUID.randomUUID() + ".zip"; File file = new File(fileName); assertThat(file.exists()).as("file should not exist").isFalse(); try { @@ -195,7 +195,7 @@ class InitCommandTests extends AbstractHttpClientMockTests { @Test void generateProjectAndExtractUnknownContentType(@TempDir File tempDir) throws Exception { - String fileName = UUID.randomUUID().toString() + ".zip"; + String fileName = UUID.randomUUID() + ".zip"; File file = new File(fileName); assertThat(file.exists()).as("file should not exist").isFalse(); try { diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc index cfec4f5a20..b2d632cc4d 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc @@ -562,7 +562,7 @@ If that is not what you want, you can disable transaction management for a test include::code:MyTransactionalTests[] -If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `DataJpaTest`. +If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `@DataJpaTest`. (See "<>".) @@ -580,7 +580,7 @@ By default, Data JDBC tests are transactional and roll back at the end of each t See the {spring-framework-docs}/testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details. If that is not what you want, you can disable transaction management for a test or for the whole test class as <>. -If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `DataJpaTest`. +If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `@DataJpaTest`. (See "<>".) @@ -588,7 +588,7 @@ If you prefer your test to run against a real database, you can use the `@AutoCo [[features.testing.spring-boot-applications.autoconfigured-spring-data-r2dbc]] ==== Auto-configured Data R2DBC Tests `@DataR2dbcTest` is similar to `@DataJdbcTest` but is for tests that use Spring Data R2DBC repositories. -By default, it configures an in-memory embedded database, a `R2dbcEntityTemplate`, and Spring Data R2DBC repositories. +By default, it configures an in-memory embedded database, an `R2dbcEntityTemplate`, and Spring Data R2DBC repositories. Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataR2dbcTest` annotation is used. `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. @@ -596,7 +596,7 @@ TIP: A list of the auto-configurations that are enabled by `@DataR2dbcTest` can By default, Data R2DBC tests are not transactional. -If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `DataJpaTest`. +If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `@DataJpaTest`. (See "<>".) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc index f279bb60a4..6144bd7c22 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc @@ -276,7 +276,7 @@ Alternatively, rather than open all suffix patterns, it is more secure to only s As of Spring Framework 5.3, Spring MVC supports two strategies for matching request paths to controllers. By default, Spring Boot uses the `PathPatternParser` strategy. `PathPatternParser` is an https://spring.io/blog/2020/06/30/url-matching-with-pathpattern-in-spring-mvc[optimized implementation] but comes with some restrictions compared to the `AntPathMatcher` strategy. -`PathPatternParser` restricts usage of {spring-framework-docs}/web.html#mvc-ann-requestmapping-uri-templates[some path patterns variants]. +`PathPatternParser` restricts usage of {spring-framework-docs}/web.html#mvc-ann-requestmapping-uri-templates[some path pattern variants]. It is also incompatible with suffix pattern matching (configprop:spring.mvc.pathmatch.use-suffix-pattern[deprecated], configprop:spring.mvc.pathmatch.use-registered-suffix-pattern[deprecated]) and configuring the `DispatcherServlet` with a path prefix (configprop:spring.mvc.servlet.path[]). The strategy can be configured using the configprop:spring.mvc.pathmatch.matching-strategy[] configuration property, as shown in the following example: diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/DependencyFilterMojoTests.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/DependencyFilterMojoTests.java index d32b34e1c8..1af5b837df 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/DependencyFilterMojoTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/DependencyFilterMojoTests.java @@ -137,7 +137,7 @@ class DependencyFilterMojoTests { } private static File createArtifactFile(String jarType) { - Path jarPath = temp.resolve(UUID.randomUUID().toString() + ".jar"); + Path jarPath = temp.resolve(UUID.randomUUID() + ".jar"); Manifest manifest = new Manifest(); manifest.getMainAttributes().putValue("Manifest-Version", "1.0"); if (jarType != null) { From 5a75fae23bdcf6ee41e1e840f1e07495155cde9e Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 11 Oct 2023 14:58:04 +0100 Subject: [PATCH 2/2] Polish "Polish" See gh-37745 --- .../boot/autoconfigure/codec/CodecProperties.java | 2 +- .../boot/autoconfigure/hateoas/HateoasProperties.java | 2 +- .../boot/autoconfigure/rsocket/RSocketProperties.java | 2 +- .../springframework/boot/cli/command/init/InitCommandTests.java | 2 +- .../springframework/boot/maven/DependencyFilterMojoTests.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/codec/CodecProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/codec/CodecProperties.java index b63034b9d4..3686d39c36 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/codec/CodecProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/codec/CodecProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2023 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/hateoas/HateoasProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HateoasProperties.java index b0f369a8a4..a1a1721550 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HateoasProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HateoasProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2023 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/rsocket/RSocketProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketProperties.java index 235e37eb8b..b5af9bc503 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2023 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-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java index 1ac18747b8..0038084619 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2023 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-maven-plugin/src/test/java/org/springframework/boot/maven/DependencyFilterMojoTests.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/DependencyFilterMojoTests.java index 1af5b837df..00d105892a 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/DependencyFilterMojoTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/DependencyFilterMojoTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2023 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.