Commit Graph

30404 Commits

Author SHA1 Message Date
Arjen Poutsma
df01b013fa Merge branch '6.1.x' 2024-06-13 11:11:13 +02:00
Arjen Poutsma
6f32ff489a Use null stream in ReactorNettyClientResponse if no body is available
Closes gh-32805
2024-06-13 11:10:50 +02:00
Stéphane Nicoll
69c44dee99 Add support for conversion of the whole JSON document
Closes gh-33018
2024-06-13 00:12:33 +02:00
Johnny Lim
f3d390a95f Fix package description for org.springframework.validation.annotation
See gh-32532
2024-06-12 17:45:32 +02:00
Juergen Hoeller
b196167f19 Merge branch '6.1.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2024-06-12 14:28:53 +02:00
Juergen Hoeller
24c8dfea1f Remove duplicated javadoc paragraph 2024-06-12 14:23:26 +02:00
Juergen Hoeller
cdfe5816c8 Upgrade to Netty 4.1.111 and Awaitility 4.2.1 2024-06-12 14:23:14 +02:00
Juergen Hoeller
8b8604db73 Align after merge from 6.1.x 2024-06-12 13:34:53 +02:00
Juergen Hoeller
4bb755e2d2 Merge branch '6.1.x' 2024-06-12 13:31:38 +02:00
Juergen Hoeller
0ff200b2f1 Trigger cancellation on context close for non-managed objects only
Specifically for prototype/scoped beans and FactoryBean-exposed objects.

Closes gh-33009
2024-06-12 13:31:00 +02:00
Juergen Hoeller
7a7f34f4ad Defensive access to volatile ScheduledFuture field
Includes defensive test arrangement for isInThePast() with at least 1 ms having passed.

See gh-24560
2024-06-12 13:01:58 +02:00
Arjen Poutsma
099d016857 Handle trailing semicolon in Accept-Language
Closes gh-32259
2024-06-12 12:28:26 +02:00
Stéphane Nicoll
1d0af7e5d3 Move TestBeanFactory to example package 2024-06-12 11:05:22 +02:00
Stéphane Nicoll
3f2d9c372d Migrate "Failing" test cases to regular tests
This commit replaces the use of EngineTestKit to test scenarios where
bean override could not process the test class. There is no need to
run an actual test for this as:

1. Regular integration tests are already validating that adding the
annotation triggers the processing as part of executing the test.
2. The entry point is a ContextCustomizer that can easily be invoked
in a regular test.

As part of harmonizing this, AbstractTestBeanIntegrationTestCase can
be nested, and BeanOverrideTestSuite serve no purpose. The tests can
be executed in an IDE without any special setup.
2024-06-12 11:03:14 +02:00
Stéphane Nicoll
1318f65223 Harmonize test class names
This commit harmonizes the class names of the bean override support by
using a consistent prefix for integration test, inspire from the one
that was used in Spring Boot
2024-06-12 08:54:24 +02:00
Stéphane Nicoll
2d48371c6d Revert polish on Bean Override support
This commit revers the removal of the `private` keyword in the examples
of the reference documentation and the tests for consistency. While the
default visibility makes the example more concise, it could imply to the
reader that the field (or the factory method) cannot be private.

Also, there is no need to multiply anything returned from `Objects.hash`
as its very distinct on its own already.
2024-06-12 08:11:18 +02:00
Brian Clozel
dc2c8d6094 Add execution metadata to tasks and scheduled tasks
This commit adds new information about the execution and scheduling of
tasks.

The `Task` type now exposes the `TaskExecutionOutcome` of the latest
execution; this includes the instant the execution started, the
execution outcome and any thrown exception.

The `ScheduledTask` contract can now provide the time when the next
execution is scheduled.

Closes gh-24560
2024-06-11 19:34:41 +02:00
Sam Brannen
46dccd8f97 Polishing 2024-06-11 16:39:24 +02:00
Sam Brannen
a4912dd5b1 Remove obsolete field
See gh-32992
2024-06-11 16:35:13 +02:00
Sam Brannen
f35c39fe1e Clean up warnings in Gradle build 2024-06-11 16:32:14 +02:00
Sam Brannen
f481a4b60b Polish reference documentation 2024-06-11 16:31:56 +02:00
Arjen Poutsma
60b5bbe334 Introduce request attributes in RestClient
This commit introduces request attributes in the RestClient and
underlying infrastructure (i.e. HttpRequest).

Closes gh-32027
2024-06-11 15:51:29 +02:00
Stéphane Nicoll
c36e270481 Upgrade to Reactor 2024.0.0-M3
Closes gh-33006
2024-06-11 14:47:40 +02:00
Stéphane Nicoll
a5432a82e9 Merge branch '6.1.x' 2024-06-11 14:46:32 +02:00
Stéphane Nicoll
261dac87cc Upgrade to Reactor 2023.0.7
Closes gh-33007
2024-06-11 14:42:08 +02:00
Stéphane Nicoll
89e894205a Improve exception message to include affected configuration class
Closes gh-32998
2024-06-11 14:24:28 +02:00
Brian Clozel
a6fb7e99a0 Support for Protobuf 4.x
This commit compiles our Protobuf against 4.27, effectively raising our
baseline to 3.9+.

This commit also re-generates all the Java messages from the .proto spec
using the latest protoc binary.

Closes gh-33011
2024-06-11 14:12:55 +02:00
Stéphane Nicoll
2a680934ee Harmonize equals/hashCode of OverrideMetadata to use class identity
This commit harmonizes the equals/hashCode behavior of OverrideMetadata
to always take the implementation class as a factor for its identity.

This is important as two OverrideMetadata implementations could use
the same strategy and other settings while creating the override value
in a totally different way. This commit makes sure they are identified
as different.

Closes gh-33005
2024-06-11 12:03:31 +02:00
Stéphane Nicoll
1be92f82af Polish 2024-06-11 11:58:19 +02:00
Stéphane Nicoll
28f62abda4 Use the field name as a fallback qualifier for Bean Overriding
This commit harmonizes how a candidate bean definition is determined
for overriding using `@TestBean`, `@MockitoBean`, and `@MockitoSpyBean`.

Previously, a qualifier was necessary even if the name of the annotated
field matches the name of a candidate. After this commit, such candidate
will be picked up transparently, the same it is done for regular
autowiring.

This commit also reviews the documentation of the feature as considering
the field means that its name is taken into account to compute a cache
key if by-type lookup is requested.

Closes gh-32939
2024-06-11 11:30:01 +02:00
Sébastien Deleuze
4c7374797e Polishing
Closes gh-32931
2024-06-11 10:20:14 +02:00
Sébastien Deleuze
611367e4bb Add coroutine variant of WebExceptionHandler
See gh-32931
2024-06-11 10:09:17 +02:00
Juergen Hoeller
3d8488a7d8 Upgrade to Micrometer 1.13.1
Closes gh-33000
2024-06-11 09:13:42 +02:00
Juergen Hoeller
e43e659983 Merge branch '6.1.x'
# Conflicts:
#	framework-docs/modules/ROOT/pages/core/beans/definition.adoc
#	framework-platform/framework-platform.gradle
#	spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java
2024-06-11 09:11:42 +02:00
Juergen Hoeller
fce2f49e46 Polishing (aligned with main) 2024-06-11 09:07:09 +02:00
Juergen Hoeller
eca2b9657e Documentation notes for @Bean overriding and bean name matching
Closes gh-32825
2024-06-11 09:06:33 +02:00
Juergen Hoeller
e48f37d956 Upgrade to Micrometer 1.12.7
Closes gh-33001
2024-06-11 09:05:48 +02:00
Juergen Hoeller
ddc397dd05 Upgrade to spring-javaformat-checkstyle 0.0.42 2024-06-11 09:04:30 +02:00
Stéphane Nicoll
720b7c1dac Merge branch '6.1.x' 2024-06-11 06:53:22 +02:00
Stéphane Nicoll
6b7f0bd4b6 Fix typo 2024-06-11 06:47:42 +02:00
Sébastien Deleuze
68e6b152ef Merge branch '6.1.x' 2024-06-10 22:46:03 +02:00
Sébastien Deleuze
c97a895f09 Add support for double backslashes to StringUtils#cleanPath
Closes gh-32962
2024-06-10 22:25:31 +02:00
Juergen Hoeller
42c17eb787 Documentation notes for @Bean overriding and bean name matching
See gh-31052
See gh-28122
2024-06-10 16:43:05 +02:00
Stéphane Nicoll
b9a6ba1242 Fix package tangle in bean override tests
This commit fixes a package tangle between the root bean override
package and its sub-packages. This was vastly improved with the
introduction of `@DummyBean` but we still had a few tests that were
at the wrong place.
2024-06-10 15:23:36 +02:00
Stéphane Nicoll
96302a7102 Stop using a conventional suffix for TestBean factory methods
This commit changes how factory method for `@TestBean` usage is
discovered. Previously the field name or bean name suffixed with
'TestOverride' was used. It sounds more natural to just use the
field name or bean name, leaving cases where a suffix is required
to explicitly providing the method name.

As part of this change, the exception messages have been revisited as
it's less since the method name candidates have the exact same name
as the field or bean name. A `()` is added to make it more clear the
name is for a method.

Closes gh-32940
2024-06-10 12:52:21 +02:00
rstoyanchev
5787bc569d Merge branch '6.1.x' 2024-06-10 10:48:49 +01:00
rstoyanchev
3b13f2ed38 Update code-of-conduct email 2024-06-10 10:48:06 +01:00
Stéphane Nicoll
45e9f04b57 Remove TestOverrideMetadata and use dummy implementation
TestOverrideMetadata was doing byName lookup by default, even without
a bean name. This makes writing tests that need to do by type lookup
way more complicated that it should.

This commit introduces DummyBean, that merely replaces two types with
hardcoded values. It also exposes the raw attribute of OverrideMetadata
and doesn't override anything from it to make sure the behavior is not
altered.

Closes gh-32982
2024-06-10 11:27:27 +02:00
Juergen Hoeller
457bf9416c Configure individual timeouts for specific shutdown phases
Closes gh-32985
2024-06-10 11:00:47 +02:00
Stéphane Nicoll
b7e4fa06c3 Merge branch '6.1.x' 2024-06-10 10:02:41 +02:00