diff --git a/framework-docs/modules/ROOT/pages/testing/testcontext-framework/fixture-di.adoc b/framework-docs/modules/ROOT/pages/testing/testcontext-framework/fixture-di.adoc index e269ea300e7..4d83ff13224 100644 --- a/framework-docs/modules/ROOT/pages/testing/testcontext-framework/fixture-di.adoc +++ b/framework-docs/modules/ROOT/pages/testing/testcontext-framework/fixture-di.adoc @@ -35,6 +35,11 @@ dependency injection altogether by explicitly configuring your class with `@TestExecutionListeners` and omitting `DependencyInjectionTestExecutionListener.class` from the list of listeners. +[NOTE] +==== +If you are using Spring Boot's `@LocalServerPort` annotation in tests, be aware that it may not be injected correctly when using nested test classes with inheritance (see https://github.com/spring-projects/spring-framework/issues/35906[gh-35906]). +==== + Consider the scenario of testing a `HibernateTitleRepository` class, as outlined in the xref:testing/integration.adoc#integration-testing-goals[Goals] section. The next two code listings demonstrate the use of `@Autowired` on fields and setter methods. The application