Skip to content

Commit bd1424b

Browse files
committed
Merge branch '2.6.x' into 2.7.x
Closes gh-30528
2 parents fc2a655 + bf3c2d7 commit bd1424b

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ The use of placeholders with and without defaults is shown in the following exam
453453
description: "${app.name} is a Spring Boot application written by ${username:Unknown}"
454454
----
455455

456-
Assuming that the `username` property has not be set elsewhere, `app.description` will have the value `MyApp is a Spring Boot application written by Unknown`.
456+
Assuming that the `username` property has not been set elsewhere, `app.description` will have the value `MyApp is a Spring Boot application written by Unknown`.
457457

458458
TIP: You can also use this technique to create "`short`" variants of existing Spring Boot properties.
459459
See the _<<howto#howto.properties-and-configuration.short-command-line-arguments>>_ how-to for details.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/testing.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ include::{docs-java}/howto/testing/slicetests/MyConfiguration.java[]
5252

5353
For a `@WebMvcTest` for an application with the above `@Configuration` class, you might expect to have the `SecurityFilterChain` bean in the application context so that you can test if your controller endpoints are secured properly.
5454
However, `MyConfiguration` is not picked up by @WebMvcTest's component scanning filter because it doesn't match any of the types specified by the filter.
55-
You can include the configuration explicitly by annotating the test class with `@Import(MySecurityConfiguration.class)`.
55+
You can include the configuration explicitly by annotating the test class with `@Import(MyConfiguration.class)`.
5656
This will load all the beans in `MyConfiguration` including the `BasicDataSource` bean which isn't required when testing the web tier.
5757
Splitting the configuration class into two will enable importing just the security configuration.
5858

@@ -66,6 +66,6 @@ include::{docs-java}/howto/testing/slicetests/MySecurityConfiguration.java[]
6666
include::{docs-java}/howto/testing/slicetests/MyDatasourceConfiguration.java[]
6767
----
6868

69-
Having a single configuration class can be inefficient when beans of a certain domain needed to be included in slice tests.
69+
Having a single configuration class can be inefficient when beans of a certain domain need to be included in slice tests.
7070
Instead, structuring the application's configuration as multiple granular classes with beans for a specific domain can enable importing them only for specific slice tests.
7171

spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/reactive.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ The first step to customizing this feature often involves using the existing mec
142142
For that, you can add a bean of type `ErrorAttributes`.
143143

144144
To change the error handling behavior, you can implement `ErrorWebExceptionHandler` and register a bean definition of that type.
145-
Because a `ErrorWebExceptionHandler` is quite low-level, Spring Boot also provides a convenient `AbstractErrorWebExceptionHandler` to let you handle errors in a WebFlux functional way, as shown in the following example:
145+
Because an `ErrorWebExceptionHandler` is quite low-level, Spring Boot also provides a convenient `AbstractErrorWebExceptionHandler` to let you handle errors in a WebFlux functional way, as shown in the following example:
146146

147147
include::code:MyErrorWebExceptionHandler[]
148148

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/ValueObjectBinderTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import org.springframework.core.ResolvableType;
4545
import org.springframework.core.convert.ConversionService;
4646
import org.springframework.format.annotation.DateTimeFormat;
47-
import org.springframework.test.util.ReflectionTestUtils;
4847
import org.springframework.util.Assert;
4948

5049
import static org.assertj.core.api.Assertions.assertThat;
@@ -389,8 +388,8 @@ void bindToRecordWithDefaultValue(@TempDir File tempDir) throws IOException, Cla
389388
compiler.getTask(Arrays.asList(recordProperties)).call();
390389
ClassLoader ucl = new URLClassLoader(new URL[] { tempDir.toURI().toURL() });
391390
Object bean = this.binder.bind("test.record", Class.forName("RecordProperties", true, ucl)).get();
392-
assertThat(ReflectionTestUtils.getField(bean, "property1")).isEqualTo("value-from-config-1");
393-
assertThat(ReflectionTestUtils.getField(bean, "property2")).isEqualTo("default-value-2");
391+
assertThat(bean).hasFieldOrPropertyWithValue("property1", "value-from-config-1")
392+
.hasFieldOrPropertyWithValue("property2", "default-value-2");
394393
}
395394

396395
private void noConfigurationProperty(BindException ex) {

0 commit comments

Comments
 (0)