Merge branch '6.2.x'

This commit is contained in:
Sam Brannen 2025-04-10 16:49:43 +02:00
commit df4868bf83
35 changed files with 112 additions and 145 deletions

View File

@ -4,7 +4,7 @@
Once the TestContext framework loads an `ApplicationContext` (or `WebApplicationContext`) Once the TestContext framework loads an `ApplicationContext` (or `WebApplicationContext`)
for a test, that context is cached and reused for all subsequent tests that declare the for a test, that context is cached and reused for all subsequent tests that declare the
same unique context configuration within the same test suite. To understand how caching same unique context configuration within the same test suite. To understand how caching
works, it is important to understand what is meant by "`unique`" and "`test suite.`" works, it is important to understand what is meant by "unique" and "test suite."
An `ApplicationContext` can be uniquely identified by the combination of configuration An `ApplicationContext` can be uniquely identified by the combination of configuration
parameters that is used to load it. Consequently, the unique combination of configuration parameters that is used to load it. Consequently, the unique combination of configuration
@ -15,8 +15,8 @@ framework uses the following configuration parameters to build the context cache
* `classes` (from `@ContextConfiguration`) * `classes` (from `@ContextConfiguration`)
* `contextInitializerClasses` (from `@ContextConfiguration`) * `contextInitializerClasses` (from `@ContextConfiguration`)
* `contextCustomizers` (from `ContextCustomizerFactory`) this includes * `contextCustomizers` (from `ContextCustomizerFactory`) this includes
`@DynamicPropertySource` methods as well as various features from Spring Boot's `@DynamicPropertySource` methods, bean overrides (such as `@TestBean`, `@MockitoBean`,
testing support such as `@MockBean` and `@SpyBean`. `@MockitoSpyBean` etc.), as well as various features from Spring Boot's testing support.
* `contextLoader` (from `@ContextConfiguration`) * `contextLoader` (from `@ContextConfiguration`)
* `parent` (from `@ContextHierarchy`) * `parent` (from `@ContextHierarchy`)
* `activeProfiles` (from `@ActiveProfiles`) * `activeProfiles` (from `@ActiveProfiles`)

View File

@ -18,9 +18,9 @@ Do not run tests in parallel if the tests:
* Use Spring Framework's `@DirtiesContext` support. * Use Spring Framework's `@DirtiesContext` support.
* Use Spring Framework's `@MockitoBean` or `@MockitoSpyBean` support. * Use Spring Framework's `@MockitoBean` or `@MockitoSpyBean` support.
* Use Spring Boot's `@MockBean` or `@SpyBean` support. * Use Spring Boot's `@MockBean` or `@SpyBean` support.
* Use JUnit 4's `@FixMethodOrder` support or any testing framework feature * Use JUnit Jupiter's `@TestMethodOrder` support or any testing framework feature that is
that is designed to ensure that test methods run in a particular order. Note, designed to ensure that test methods run in a particular order. Note, however, that
however, that this does not apply if entire test classes are run in parallel. this does not apply if entire test classes are run in parallel.
* Change the state of shared services or systems such as a database, message broker, * Change the state of shared services or systems such as a database, message broker,
filesystem, and others. This applies to both embedded and external systems. filesystem, and others. This applies to both embedded and external systems.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2022 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -59,7 +59,7 @@ public class DefaultResourceLoader implements ResourceLoader {
/** /**
* Create a new DefaultResourceLoader. * Create a new DefaultResourceLoader.
* <p>ClassLoader access will happen using the thread context class loader * <p>ClassLoader access will happen using the thread context class loader
* at the time of actual resource access (since 5.3). For more control, pass * at the time of actual resource access. For more control, pass
* a specific ClassLoader to {@link #DefaultResourceLoader(ClassLoader)}. * a specific ClassLoader to {@link #DefaultResourceLoader(ClassLoader)}.
* @see java.lang.Thread#getContextClassLoader() * @see java.lang.Thread#getContextClassLoader()
*/ */
@ -80,7 +80,7 @@ public class DefaultResourceLoader implements ResourceLoader {
* Specify the ClassLoader to load class path resources with, or {@code null} * Specify the ClassLoader to load class path resources with, or {@code null}
* for using the thread context class loader at the time of actual resource access. * for using the thread context class loader at the time of actual resource access.
* <p>The default is that ClassLoader access will happen using the thread context * <p>The default is that ClassLoader access will happen using the thread context
* class loader at the time of actual resource access (since 5.3). * class loader at the time of actual resource access.
*/ */
public void setClassLoader(@Nullable ClassLoader classLoader) { public void setClassLoader(@Nullable ClassLoader classLoader) {
this.classLoader = classLoader; this.classLoader = classLoader;

View File

@ -125,13 +125,12 @@ public class SpringFactoriesLoader {
* Load and instantiate the factory implementations of the given type from * Load and instantiate the factory implementations of the given type from
* {@value #FACTORIES_RESOURCE_LOCATION}, using the configured class loader * {@value #FACTORIES_RESOURCE_LOCATION}, using the configured class loader
* and a default argument resolver that expects a no-arg constructor. * and a default argument resolver that expects a no-arg constructor.
* <p>The returned factories are sorted through {@link AnnotationAwareOrderComparator}. * <p>The returned factories are sorted using {@link AnnotationAwareOrderComparator}.
* <p>If a custom instantiation strategy is required, use {@code load(...)} * <p>If a custom instantiation strategy is required, use {@code load(...)}
* with a custom {@link ArgumentResolver ArgumentResolver} and/or * with a custom {@link ArgumentResolver ArgumentResolver} and/or
* {@link FailureHandler FailureHandler}. * {@link FailureHandler FailureHandler}.
* <p>As of Spring Framework 5.3, if duplicate implementation class names are * <p>If duplicate implementation class names are discovered for a given factory
* discovered for a given factory type, only one instance of the duplicated * type, only one instance of the duplicated implementation type will be instantiated.
* implementation type will be instantiated.
* @param factoryType the interface or abstract class representing the factory * @param factoryType the interface or abstract class representing the factory
* @throws IllegalArgumentException if any factory implementation class cannot * @throws IllegalArgumentException if any factory implementation class cannot
* be loaded or if an error occurs while instantiating any factory * be loaded or if an error occurs while instantiating any factory
@ -145,10 +144,9 @@ public class SpringFactoriesLoader {
* Load and instantiate the factory implementations of the given type from * Load and instantiate the factory implementations of the given type from
* {@value #FACTORIES_RESOURCE_LOCATION}, using the configured class loader * {@value #FACTORIES_RESOURCE_LOCATION}, using the configured class loader
* and the given argument resolver. * and the given argument resolver.
* <p>The returned factories are sorted through {@link AnnotationAwareOrderComparator}. * <p>The returned factories are sorted using {@link AnnotationAwareOrderComparator}.
* <p>As of Spring Framework 5.3, if duplicate implementation class names are * <p>If duplicate implementation class names are discovered for a given factory
* discovered for a given factory type, only one instance of the duplicated * type, only one instance of the duplicated implementation type will be instantiated.
* implementation type will be instantiated.
* @param factoryType the interface or abstract class representing the factory * @param factoryType the interface or abstract class representing the factory
* @param argumentResolver strategy used to resolve constructor arguments by their type * @param argumentResolver strategy used to resolve constructor arguments by their type
* @throws IllegalArgumentException if any factory implementation class cannot * @throws IllegalArgumentException if any factory implementation class cannot
@ -163,10 +161,9 @@ public class SpringFactoriesLoader {
* Load and instantiate the factory implementations of the given type from * Load and instantiate the factory implementations of the given type from
* {@value #FACTORIES_RESOURCE_LOCATION}, using the configured class loader * {@value #FACTORIES_RESOURCE_LOCATION}, using the configured class loader
* with custom failure handling provided by the given failure handler. * with custom failure handling provided by the given failure handler.
* <p>The returned factories are sorted through {@link AnnotationAwareOrderComparator}. * <p>The returned factories are sorted using {@link AnnotationAwareOrderComparator}.
* <p>As of Spring Framework 5.3, if duplicate implementation class names are * <p>If duplicate implementation class names are discovered for a given factory
* discovered for a given factory type, only one instance of the duplicated * type, only one instance of the duplicated implementation type will be instantiated.
* implementation type will be instantiated.
* <p>For any factory implementation class that cannot be loaded or error that * <p>For any factory implementation class that cannot be loaded or error that
* occurs while instantiating it, the given failure handler is called. * occurs while instantiating it, the given failure handler is called.
* @param factoryType the interface or abstract class representing the factory * @param factoryType the interface or abstract class representing the factory
@ -182,10 +179,9 @@ public class SpringFactoriesLoader {
* {@value #FACTORIES_RESOURCE_LOCATION}, using the configured class loader, * {@value #FACTORIES_RESOURCE_LOCATION}, using the configured class loader,
* the given argument resolver, and custom failure handling provided by the given * the given argument resolver, and custom failure handling provided by the given
* failure handler. * failure handler.
* <p>The returned factories are sorted through {@link AnnotationAwareOrderComparator}. * <p>The returned factories are sorted using {@link AnnotationAwareOrderComparator}.
* <p>As of Spring Framework 5.3, if duplicate implementation class names are * <p>If duplicate implementation class names are discovered for a given factory
* discovered for a given factory type, only one instance of the duplicated * type, only one instance of the duplicated implementation type will be instantiated.
* implementation type will be instantiated.
* <p>For any factory implementation class that cannot be loaded or error that * <p>For any factory implementation class that cannot be loaded or error that
* occurs while instantiating it, the given failure handler is called. * occurs while instantiating it, the given failure handler is called.
* @param factoryType the interface or abstract class representing the factory * @param factoryType the interface or abstract class representing the factory
@ -235,12 +231,11 @@ public class SpringFactoriesLoader {
/** /**
* Load and instantiate the factory implementations of the given type from * Load and instantiate the factory implementations of the given type from
* {@value #FACTORIES_RESOURCE_LOCATION}, using the given class loader. * {@value #FACTORIES_RESOURCE_LOCATION}, using the given class loader.
* <p>The returned factories are sorted through {@link AnnotationAwareOrderComparator}. * <p>The returned factories are sorted using {@link AnnotationAwareOrderComparator}.
* <p>As of Spring Framework 5.3, if duplicate implementation class names are * <p>If duplicate implementation class names are discovered for a given factory
* discovered for a given factory type, only one instance of the duplicated * type, only one instance of the duplicated implementation type will be instantiated.
* implementation type will be instantiated.
* <p>For more advanced factory loading with {@link ArgumentResolver} or * <p>For more advanced factory loading with {@link ArgumentResolver} or
* {@link FailureHandler} support use {@link #forDefaultResourceLocation(ClassLoader)} * {@link FailureHandler} support, use {@link #forDefaultResourceLocation(ClassLoader)}
* to obtain a {@link SpringFactoriesLoader} instance. * to obtain a {@link SpringFactoriesLoader} instance.
* @param factoryType the interface or abstract class representing the factory * @param factoryType the interface or abstract class representing the factory
* @param classLoader the ClassLoader to use for loading (can be {@code null} * @param classLoader the ClassLoader to use for loading (can be {@code null}
@ -256,9 +251,8 @@ public class SpringFactoriesLoader {
* Load the fully qualified class names of factory implementations of the * Load the fully qualified class names of factory implementations of the
* given type from {@value #FACTORIES_RESOURCE_LOCATION}, using the given * given type from {@value #FACTORIES_RESOURCE_LOCATION}, using the given
* class loader. * class loader.
* <p>As of Spring Framework 5.3, if a particular implementation class name * <p>If a particular implementation class name is discovered more than once
* is discovered more than once for the given factory type, duplicates will * for the given factory type, duplicates will be ignored.
* be ignored.
* @param factoryType the interface or abstract class representing the factory * @param factoryType the interface or abstract class representing the factory
* @param classLoader the ClassLoader to use for loading resources; can be * @param classLoader the ClassLoader to use for loading resources; can be
* {@code null} to use the default * {@code null} to use the default

View File

@ -103,7 +103,7 @@ public abstract class CollectionUtils {
* <p>This differs from the regular {@link LinkedHashMap} constructor * <p>This differs from the regular {@link LinkedHashMap} constructor
* which takes an initial capacity relative to a load factor but is * which takes an initial capacity relative to a load factor but is
* aligned with Spring's own {@link LinkedCaseInsensitiveMap} and * aligned with Spring's own {@link LinkedCaseInsensitiveMap} and
* {@link LinkedMultiValueMap} constructor semantics as of 5.3. * {@link LinkedMultiValueMap} constructor semantics.
* @param expectedSize the expected number of elements (with a corresponding * @param expectedSize the expected number of elements (with a corresponding
* capacity to be derived so that no resize/rehash operations are needed) * capacity to be derived so that no resize/rehash operations are needed)
* @since 5.3 * @since 5.3

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2020 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -35,8 +35,7 @@ import java.util.Map;
* @param <K> the key type * @param <K> the key type
* @param <V> the value element type * @param <V> the value element type
*/ */
public class LinkedMultiValueMap<K, V> extends MultiValueMapAdapter<K, V> // new public base class in 5.3 public class LinkedMultiValueMap<K, V> extends MultiValueMapAdapter<K, V> implements Serializable, Cloneable {
implements Serializable, Cloneable {
private static final long serialVersionUID = 3801124242820219131L; private static final long serialVersionUID = 3801124242820219131L;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2022 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -44,8 +44,7 @@ import java.lang.annotation.Target;
* {@code @Commit} and {@code @Rollback} on the same test method or on the * {@code @Commit} and {@code @Rollback} on the same test method or on the
* same test class is unsupported and may lead to unpredictable results. * same test class is unsupported and may lead to unpredictable results.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default. See
* enclosing test class by default. See
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
* for details. * for details.
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -76,8 +76,7 @@ import java.lang.annotation.Target;
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom * <p>This annotation may be used as a <em>meta-annotation</em> to create custom
* <em>composed annotations</em>. * <em>composed annotations</em>.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default. See
* enclosing test class by default. See
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
* for details. * for details.
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -48,8 +48,7 @@ import java.lang.annotation.Target;
* custom <em>composed annotations</em>. Consult the source code for * custom <em>composed annotations</em>. Consult the source code for
* {@link Commit @Commit} for a concrete example. * {@link Commit @Commit} for a concrete example.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default. See
* enclosing test class by default. See
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
* for details. * for details.
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -34,9 +34,8 @@ import org.springframework.core.annotation.AliasFor;
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom * <p>This annotation may be used as a <em>meta-annotation</em> to create custom
* <em>composed annotations</em>. * <em>composed annotations</em>.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default.
* enclosing test class by default. See * See {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* *
* @author Sam Brannen * @author Sam Brannen
* @since 3.1 * @since 3.1

View File

@ -34,9 +34,8 @@ import java.lang.annotation.Target;
* present</em> on the current test class) will override any meta-present * present</em> on the current test class) will override any meta-present
* declarations of {@code @BootstrapWith}. * declarations of {@code @BootstrapWith}.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default.
* enclosing test class by default. See * See {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* *
* @author Sam Brannen * @author Sam Brannen
* @since 4.1 * @since 4.1

View File

@ -75,9 +75,8 @@ import org.springframework.core.annotation.AliasFor;
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom * <p>This annotation may be used as a <em>meta-annotation</em> to create custom
* <em>composed annotations</em>. * <em>composed annotations</em>.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default.
* enclosing test class by default. See * See {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* *
* @author Sam Brannen * @author Sam Brannen
* @since 2.5 * @since 2.5

View File

@ -205,9 +205,8 @@ import java.lang.annotation.Target;
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom * <p>This annotation may be used as a <em>meta-annotation</em> to create custom
* <em>composed annotations</em>. * <em>composed annotations</em>.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default.
* enclosing test class by default. See * See {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* *
* @author Sam Brannen * @author Sam Brannen
* @since 3.2.2 * @since 3.2.2

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -53,9 +53,8 @@ import org.jspecify.annotations.Nullable;
* {@link org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig @SpringJUnitWebConfig} * {@link org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig @SpringJUnitWebConfig}
* or various test-related annotations from Spring Boot Test. * or various test-related annotations from Spring Boot Test.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default.
* enclosing test class by default. See * See {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* *
* @author Sam Brannen * @author Sam Brannen
* @since 5.2 * @since 5.2
@ -88,7 +87,7 @@ public @interface TestConstructor {
* <p>May alternatively be configured via the * <p>May alternatively be configured via the
* {@link org.springframework.core.SpringProperties SpringProperties} * {@link org.springframework.core.SpringProperties SpringProperties}
* mechanism. * mechanism.
* <p>As of Spring Framework 5.3, this property may also be configured as a * <p>This property may also be configured as a
* <a href="https://junit.org/junit5/docs/current/user-guide/#running-tests-config-params">JUnit * <a href="https://junit.org/junit5/docs/current/user-guide/#running-tests-config-params">JUnit
* Platform configuration parameter</a>. * Platform configuration parameter</a>.
* @see #autowireMode * @see #autowireMode

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -36,8 +36,8 @@ import org.springframework.core.annotation.AliasFor;
* mechanism described in {@link TestExecutionListener}. * mechanism described in {@link TestExecutionListener}.
* *
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom * <p>This annotation may be used as a <em>meta-annotation</em> to create custom
* <em>composed annotations</em>. As of Spring Framework 5.3, this annotation will * <em>composed annotations</em>. In addition, this annotation will be inherited
* be inherited from an enclosing test class by default. See * from an enclosing test class by default. See
* {@link NestedTestConfiguration @NestedTestConfiguration} for details. * {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* *
* <h3>Switching to default {@code TestExecutionListener} implementations</h3> * <h3>Switching to default {@code TestExecutionListener} implementations</h3>

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -80,9 +80,8 @@ import org.springframework.core.io.support.PropertySourceFactory;
* of both annotations can lead to ambiguity during the attribute resolution * of both annotations can lead to ambiguity during the attribute resolution
* process. Note, however, that ambiguity can be avoided via explicit annotation * process. Note, however, that ambiguity can be avoided via explicit annotation
* attribute overrides using {@link AliasFor @AliasFor}.</li> * attribute overrides using {@link AliasFor @AliasFor}.</li>
* <li>As of Spring Framework 5.3, this annotation will be inherited from an * <li>This annotation will be inherited from an enclosing test class by default.
* enclosing test class by default. See * See {@link NestedTestConfiguration @NestedTestConfiguration} for details.</li>
* {@link NestedTestConfiguration @NestedTestConfiguration} for details.</li>
* </ul> * </ul>
* *
* @author Sam Brannen * @author Sam Brannen

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2020 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -31,9 +31,8 @@ import java.lang.annotation.Target;
* completely optional since {@code @TestPropertySource} is a * completely optional since {@code @TestPropertySource} is a
* {@linkplain java.lang.annotation.Repeatable repeatable} annotation. * {@linkplain java.lang.annotation.Repeatable repeatable} annotation.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default.
* enclosing test class by default. See * See {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* {@link NestedTestConfiguration @NestedTestConfiguration} for details.
* *
* @author Anatoliy Korovin * @author Anatoliy Korovin
* @author Sam Brannen * @author Sam Brannen

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2022 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -54,8 +54,7 @@ import java.lang.annotation.Target;
* {@code ""}, <code>{}</code>, or {@code DEFAULT}. Explicit local configuration * {@code ""}, <code>{}</code>, or {@code DEFAULT}. Explicit local configuration
* therefore <em>overrides</em> global configuration. * therefore <em>overrides</em> global configuration.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default. See
* enclosing test class by default. See
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
* for details. * for details.
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2022 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -34,8 +34,7 @@ import java.lang.annotation.Target;
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom * <p>This annotation may be used as a <em>meta-annotation</em> to create custom
* <em>composed annotations</em>. * <em>composed annotations</em>.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default. See
* enclosing test class by default. See
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
* for details. * for details.
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2022 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -37,8 +37,7 @@ import java.lang.annotation.Target;
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom * <p>This annotation may be used as a <em>meta-annotation</em> to create custom
* <em>composed annotations</em> with attribute overrides. * <em>composed annotations</em> with attribute overrides.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default. See
* enclosing test class by default. See
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
* for details. * for details.
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -147,9 +147,8 @@ public class SpringExtension implements BeforeAllCallback, AfterAllCallback, Tes
/** /**
* Delegates to {@link TestContextManager#prepareTestInstance}. * Delegates to {@link TestContextManager#prepareTestInstance}.
* <p>As of Spring Framework 5.3.2, this method also validates that test * <p>This method also validates that test methods and test lifecycle methods
* methods and test lifecycle methods are not annotated with * are not annotated with {@link Autowired @Autowired}.
* {@link Autowired @Autowired}.
*/ */
@Override @Override
public void postProcessTestInstance(Object testInstance, ExtensionContext context) throws Exception { public void postProcessTestInstance(Object testInstance, ExtensionContext context) throws Exception {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2023 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -36,8 +36,7 @@ import org.springframework.test.context.ContextLoader;
* {@link ContextConfiguration @ContextConfiguration} from the <em>Spring TestContext * {@link ContextConfiguration @ContextConfiguration} from the <em>Spring TestContext
* Framework</em>. * Framework</em>.
* *
* <p>As of Spring Framework 5.3, this annotation will effectively be inherited * <p>This annotation will be inherited from an enclosing test class by default. See
* from an enclosing test class by default. See
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
* for details. * for details.
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2023 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -39,8 +39,7 @@ import org.springframework.test.context.web.WebAppConfiguration;
* {@link WebAppConfiguration @WebAppConfiguration} from the <em>Spring TestContext * {@link WebAppConfiguration @WebAppConfiguration} from the <em>Spring TestContext
* Framework</em>. * Framework</em>.
* *
* <p>As of Spring Framework 5.3, this annotation will effectively be inherited * <p>This annotation will be inherited from an enclosing test class by default. See
* from an enclosing test class by default. See
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
* for details. * for details.
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -41,8 +41,7 @@ import java.lang.annotation.Target;
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom * <p>This annotation may be used as a <em>meta-annotation</em> to create custom
* <em>composed annotations</em>. * <em>composed annotations</em>.
* *
* <p>As of Spring Framework 5.3, this annotation will be inherited from an * <p>This annotation will be inherited from an enclosing test class by default. See
* enclosing test class by default. See
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration} * {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
* for details. * for details.
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2023 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -28,9 +28,8 @@ import org.springframework.util.Assert;
* Simple utility for finding available TCP ports on {@code localhost} for use in * Simple utility for finding available TCP ports on {@code localhost} for use in
* integration testing scenarios. * integration testing scenarios.
* *
* <p>This is a limited form of {@code org.springframework.util.SocketUtils}, which * <p>This is a limited form of the original {@code org.springframework.util.SocketUtils}
* has been deprecated since Spring Framework 5.3.16 and removed in Spring * class which was removed in Spring Framework 6.0.
* Framework 6.0.
* *
* <p>{@code TestSocketUtils} can be used in integration tests which start an * <p>{@code TestSocketUtils} can be used in integration tests which start an
* external server on an available random port. However, these utilities make no * external server on an available random port. However, these utilities make no

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2023 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -46,10 +46,10 @@ import org.springframework.util.Assert;
* with the {@code @Repository} annotation, along with defining this post-processor * with the {@code @Repository} annotation, along with defining this post-processor
* as a bean in the application context. * as a bean in the application context.
* *
* <p>As of 5.3, {@code PersistenceExceptionTranslator} beans will be sorted according * <p>{@code PersistenceExceptionTranslator} beans are sorted according to Spring's
* to Spring's dependency ordering rules: see {@link org.springframework.core.Ordered} * dependency ordering rules: see {@link org.springframework.core.Ordered} and
* and {@link org.springframework.core.annotation.Order}. Note that such beans will * {@link org.springframework.core.annotation.Order}. Note that such beans will
* get retrieved from any scope, not just singleton scope, as of this 5.3 revision. * get retrieved from any scope, not just singleton scope.
* *
* @author Rod Johnson * @author Rod Johnson
* @author Juergen Hoeller * @author Juergen Hoeller

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -32,9 +32,9 @@ import org.springframework.core.Ordered;
* allowing for fine-grained interaction with their execution order (if necessary). * allowing for fine-grained interaction with their execution order (if necessary).
* *
* <p>Implements the {@link Ordered} interface to enable the execution order of * <p>Implements the {@link Ordered} interface to enable the execution order of
* synchronizations to be controlled declaratively, as of 5.3. The default * synchronizations to be controlled declaratively. The default {@link #getOrder()
* {@link #getOrder() order} is {@link Ordered#LOWEST_PRECEDENCE}, indicating * order} is {@link Ordered#LOWEST_PRECEDENCE}, indicating late execution; return
* late execution; return a lower value for earlier execution. * a lower value for earlier execution.
* *
* @author Juergen Hoeller * @author Juergen Hoeller
* @since 02.06.2003 * @since 02.06.2003

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2020 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -32,7 +32,7 @@ import org.springframework.core.Ordered;
* @deprecated as of 5.3, in favor of the default methods on the * @deprecated as of 5.3, in favor of the default methods on the
* {@link TransactionSynchronization} interface * {@link TransactionSynchronization} interface
*/ */
@Deprecated @Deprecated(since = "5.3")
public abstract class TransactionSynchronizationAdapter implements TransactionSynchronization, Ordered { public abstract class TransactionSynchronizationAdapter implements TransactionSynchronization, Ordered {
@Override @Override

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -30,8 +30,8 @@ import org.springframework.web.ErrorResponse;
import org.springframework.web.util.BindErrorUtils; import org.springframework.web.util.BindErrorUtils;
/** /**
* Exception to be thrown when validation on an argument annotated with {@code @Valid} fails. * {@link BindException} to be thrown when validation on an argument annotated
* Extends {@link BindException} as of 5.3. * with {@code @Valid} fails.
* *
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @author Juergen Hoeller * @author Juergen Hoeller

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2021 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -30,11 +30,6 @@ import org.springframework.core.annotation.AliasFor;
* <p>The method parameter may be declared as type {@link jakarta.servlet.http.Cookie} * <p>The method parameter may be declared as type {@link jakarta.servlet.http.Cookie}
* or as cookie value type (String, int, etc.). * or as cookie value type (String, int, etc.).
* *
* <p>Note that with spring-webmvc 5.3.x and earlier, the cookie value is URL
* decoded. This will be changed in 6.0 but in the meantime, applications can
* also declare parameters of type {@link jakarta.servlet.http.Cookie} to access
* the raw value.
*
* @author Juergen Hoeller * @author Juergen Hoeller
* @author Sam Brannen * @author Sam Brannen
* @since 3.0 * @since 3.0

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -37,8 +37,7 @@ import org.springframework.core.annotation.AliasFor;
* specific exception. This also serves as a mapping hint if the annotation * specific exception. This also serves as a mapping hint if the annotation
* itself does not narrow the exception types through its {@link #value()}. * itself does not narrow the exception types through its {@link #value()}.
* You may refer to a top-level exception being propagated or to a nested * You may refer to a top-level exception being propagated or to a nested
* cause within a wrapper exception. As of 5.3, any cause level is being * cause within a wrapper exception. Any cause level is exposed.
* exposed, whereas previously only an immediate cause was considered.
* <li>Request and/or response objects (typically from the Servlet API). * <li>Request and/or response objects (typically from the Servlet API).
* You may choose any specific request/response type, for example, * You may choose any specific request/response type, for example,
* {@link jakarta.servlet.ServletRequest} / {@link jakarta.servlet.http.HttpServletRequest}. * {@link jakarta.servlet.ServletRequest} / {@link jakarta.servlet.http.HttpServletRequest}.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -103,12 +103,11 @@ public class ControllerAdviceBean implements Ordered {
/** /**
* Get the order value for the contained bean. * Get the order value for the contained bean.
* <p>As of Spring Framework 5.3, the order value is lazily retrieved using * <p>The order value is lazily retrieved using the following algorithm and cached.
* the following algorithm and cached. Note, however, that a * Note, however, that a {@link ControllerAdvice @ControllerAdvice} bean that is
* {@link ControllerAdvice @ControllerAdvice} bean that is configured as a * configured as a scoped bean &mdash; for example, as a request-scoped or
* scoped bean &mdash; for example, as a request-scoped or session-scoped * session-scoped bean &mdash; will not be eagerly resolved. Consequently,
* bean &mdash; will not be eagerly resolved. Consequently, {@link Ordered} is * {@link Ordered} is not honored for scoped {@code @ControllerAdvice} beans.
* not honored for scoped {@code @ControllerAdvice} beans.
* <ul> * <ul>
* <li>If the {@linkplain #resolveBean resolved bean} implements {@link Ordered}, * <li>If the {@linkplain #resolveBean resolved bean} implements {@link Ordered},
* use the value returned by {@link Ordered#getOrder()}.</li> * use the value returned by {@link Ordered#getOrder()}.</li>

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -161,13 +161,13 @@ public class ResourceWebHandler implements WebHandler, InitializingBean {
} }
/** /**
* Return the {@code List} of {@code Resource} paths to use as sources * Return the {@code List} of {@code Resource} paths to use as sources for
* for serving static resources. * serving static resources.
* <p>Note that if {@link #setLocationValues(List) locationValues} are provided, * <p>Note that if {@link #setLocationValues(List) locationValues} are provided,
* instead of loaded Resource-based locations, this method will return * instead of loaded Resource-based locations, this method will return empty
* empty until after initialization via {@link #afterPropertiesSet()}. * until after initialization via {@link #afterPropertiesSet()}.
* <p><strong>Note:</strong> As of 5.3.11 the list of locations may be filtered to * <p><strong>Note:</strong> The list of locations may be filtered to exclude
* exclude those that don't actually exist and therefore the list returned from this * those that don't actually exist and therefore the list returned from this
* method may be a subset of all given locations. See {@link #setOptimizeLocations}. * method may be a subset of all given locations. See {@link #setOptimizeLocations}.
* @see #setLocationValues * @see #setLocationValues
* @see #setLocations * @see #setLocations

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2023 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -39,9 +39,8 @@ import org.springframework.web.server.ServerWebExchange;
* which checks the WebSocket handshake request parameters, upgrades to a * which checks the WebSocket handshake request parameters, upgrades to a
* WebSocket interaction, and uses the {@link WebSocketHandler} to handle it. * WebSocket interaction, and uses the {@link WebSocketHandler} to handle it.
* *
* <p>As of 5.3 the WebFlux Java configuration, imported via * <p>Note that the WebFlux Java configuration, imported via {@code @EnableWebFlux},
* {@code @EnableWebFlux}, includes a declaration of this adapter and therefore * includes a declaration of this adapter.
* it no longer needs to be present in application configuration.
* *
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @since 5.0 * @since 5.0

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2024 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -186,8 +186,8 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
* {@code Resource} locations provided via {@link #setLocations(List) setLocations}. * {@code Resource} locations provided via {@link #setLocations(List) setLocations}.
* <p>Note that the returned list is fully initialized only after * <p>Note that the returned list is fully initialized only after
* initialization via {@link #afterPropertiesSet()}. * initialization via {@link #afterPropertiesSet()}.
* <p><strong>Note:</strong> As of 5.3.11 the list of locations may be filtered to * <p><strong>Note:</strong> The list of locations may be filtered to exclude
* exclude those that don't actually exist and therefore the list returned from this * those that don't actually exist, and therefore the list returned from this
* method may be a subset of all given locations. See {@link #setOptimizeLocations}. * method may be a subset of all given locations. See {@link #setOptimizeLocations}.
* @see #setLocationValues * @see #setLocationValues
* @see #setLocations * @see #setLocations