Commit Graph

31061 Commits

Author SHA1 Message Date
Johnny Lim 159e23730c
Fix Javadoc @⁠since tags in JettyCoreRequestUpgradeStrategy
See gh-32097
Closes gh-33569
2024-09-20 11:34:39 +02:00
Sam Brannen 8931b75b95 Polishing 2024-09-20 10:58:37 +02:00
Johnny Lim 3ba9d35e22 Polish
Closes gh-33566
2024-09-20 10:58:37 +02:00
rstoyanchev 6120076437 Merge branch '6.1.x' 2024-09-20 09:33:09 +01:00
Andrey Popov 94c04821ff Use correct method to check encoded resource path
Closes: gh-33568
2024-09-20 09:32:24 +01:00
rstoyanchev 4706ebc81e Minor refactoring in UrlHandlerFilter
See gh-33565
2024-09-19 11:55:53 +01:00
rstoyanchev 2090ece62a UrlHandlerFilter ignores trailing slash in contextPath
Closes gh-33565
2024-09-19 11:55:25 +01:00
Sam Brannen e587753b1d Introduce @⁠EasyMockBean bean override example
This commit introduces example support for a custom @⁠EasyMockBean
annotation that allows tests to use EasyMock as the mocking framework
for bean overrides in a test's ApplicationContext.

The point of this exercise is to ensure that it is possible for third
parties to introduce bean override support for mocking frameworks other
than Mockito, and that they can do so with the APIs currently in place.

Closes gh-33562
2024-09-18 17:10:06 +02:00
Sam Brannen 6c2cba5d8a Polish bean override internals 2024-09-18 14:22:15 +02:00
Simon Baslé c832d5f496 Polishing contribution
Fixes gh-33556
2024-09-18 11:44:29 +02:00
Carl Magnuson 453e7961a8 Add read timeout setter on HttpComponentsClientHttpRequestFactory
This commit adds support for HttpComponentsClientHttpRequestFactory to
set a read timeout, used on the underlying client as a RequestTimeout.

This brings the HttpComponentsClientHttpRequestFactory into alignment
with JDK, Jetty, OkHttp3, Reactor and SimpleClient
ClientHttpRequestFactory implementations.

See gh-33556
2024-09-18 11:44:29 +02:00
Brian Clozel 6f09c21f05 Merge branch '6.1.x' 2024-09-18 11:21:03 +02:00
Brian Clozel 776811bdb8 Defer ExchangeFilterFunction execution in WebClient
Prior to this commit, the `DefaultWebClient` would execute the configured
`ExchangeFilterFunction` as the reactive pipeline is assembled during
subscription. This means that if imperative code is executed in a filter
function, it won't be aware of the current observation through the local
scope.

For example, when automatic context propagation is enabled for Reactor
operators, the logger MDC will not know about the current
traceId/spanId.

This commit ensures that client filter functions execution is deferred
during the actual client exchange.

Fixes gh-33559
2024-09-18 11:18:17 +02:00
Simon Baslé 06d240b558 Merge branch '6.1.x' 2024-09-17 16:42:09 +02:00
Simon Baslé de4ff4b44b Polishing tests
This commit adds more test coverage of SpringCoreBlockHoundIntegration.

See gh-33450
2024-09-17 16:40:40 +02:00
Simon Baslé f6e96a24d4 Add BlockHound exception for ConcurrentReferenceHashMap$ReferenceManager
This commit adds a SpringCoreBlockHoundIntegration configuration to
allows `pollForPurge` method to block.

Closes gh-33450
2024-09-17 16:40:40 +02:00
Juergen Hoeller 20bc5ef68b Accept nested array type for upUntilUnresolvable check as well
Closes gh-33535
2024-09-17 16:20:54 +02:00
Sébastien Deleuze 383fa43ded Merge branch '6.1.x' 2024-09-16 16:59:31 +02:00
Antoine Rey daea92397f Reference the spring-framework-petclinic repository
Closes gh-33539
2024-09-16 16:58:34 +02:00
Sam Brannen 13e175ab46 Avoid use of static import in production code 2024-09-16 15:50:05 +02:00
Sam Brannen b60bb44256 Polish test @⁠Configuration classes 2024-09-16 15:45:32 +02:00
Sam Brannen 31a6e98eaf Introduce @⁠Disabled AOT tests for @⁠TestBean support
See gh-32933
2024-09-16 15:43:54 +02:00
Sébastien Deleuze d3755aba06 Add RestClient.Builder#messageConverters(List)
This commit also introduces the validation of the RestClient
message converters for both variants.

Closes gh-33536
2024-09-13 16:00:38 +02:00
Brian Clozel 0a001482c3 Merge branch '6.1.x' 2024-09-13 15:53:18 +02:00
Brian Clozel 5efb385e64 Read Expires cookie attribute in HttpComponents connector
Prior to this commit, the HttpComponents implementation for the
`WebClient` would only consider the max-age attribute of response
cookies when parsing the response. This is not aligned with other client
implementations that consider the max-age attribute first, and then the
expires if the former was not present. The expires date is then
translated into a max-age duration. This behavior is done naturally by
several implementations.

This commit updates the `HttpComponentsClientHttpResponse` to do the
same.

Fixes gh-33157
2024-09-13 15:49:06 +02:00
Sam Brannen 16d8df8c2f Merge branch '6.1.x' 2024-09-13 15:29:33 +02:00
Sam Brannen b388ff60dd Fix parameterized test display names and polishing 2024-09-13 15:26:56 +02:00
Sébastien Deleuze 52f0e8fb6d Refine null-safety for additional Assert methods
Closes gh-33530
2024-09-13 14:47:00 +02:00
Brian Clozel 598580020e Merge branch '6.1.x' 2024-09-13 10:21:43 +02:00
Brian Clozel 412f5f677b Fix NPEs in MimeMessageHelper when adding files without names
Prior to this commit, `MimeMessageHelper` would accept `Resource`
instances as inline attachments in multipart MIME messages. If the
provided `Resource` implementation returns `null` for `getFileName()`,
the `addInLine` method would fail with a `NullPointerException` as
Jakarta activation fails to detect the content type for a null filename.

This commit falls back on "application/octet-stream" when the filename
is not known for the given resource instead of failing with an
exception.

Fixes gh-33527
2024-09-13 10:17:58 +02:00
Brian Clozel 5838bf5888 Merge branch '6.1.x' 2024-09-13 09:33:10 +02:00
Brian Clozel 6a20987933 Add missing URI template variables in RedirectViews
Prior to this commit, the URL handler mapping would expose the matching
pattern, the path within mapping and matching URI variables as request
attributes. This was the case when the mapping would use the
`AntPathMatcher` as matching infrastructure, but not when using the
`PathPattern` variant. In this case, the map of URI variables would be
`null`. This could throw `IllegalArgumentException` when `RedirectView`
instances were relying on the presence of specific variables.

This commit ensures that URI variables are also extracted when the
`PathPatternParser` is used.

Fixes gh-33422
2024-09-13 09:28:45 +02:00
Stéphane Nicoll f6c6f7c02c Merge branch '6.1.x' 2024-09-12 14:11:13 +02:00
Stéphane Nicoll 2ae62dec8c Next development version (v6.1.14-SNAPSHOT) 2024-09-12 14:11:01 +02:00
Sam Brannen 29ffa4963c Restructure content in testing resources section 2024-09-12 13:37:58 +02:00
Sam Brannen 39e9e88932 Link to MockMvc AssertJ support from resources section 2024-09-12 13:31:13 +02:00
Sam Brannen a73b048b68 Update link to Mockito 2024-09-12 13:24:49 +02:00
Sam Brannen 129a486f52 Remove obsolete link to MockObjects.com 2024-09-12 13:23:44 +02:00
Sam Brannen d097eea3a8 Polish DynamicPropertyRegistrar documentation 2024-09-12 13:20:59 +02:00
rstoyanchev 398e5528a1 Merge branch '6.1.x' 2024-09-12 08:40:58 +01:00
rstoyanchev d86bf8b205 Align RouterFunctions resource handling
Closes: gh-33434
2024-09-12 08:33:37 +01:00
Sam Brannen 884105d469 Merge branch '6.1.x' 2024-09-11 18:08:30 +02:00
Sam Brannen c77de8a6fb Downgrade to Tomcat 10.1.28
Tomcat 10.1.29 was causing failures in spring-webflux when running a
full build.
2024-09-11 18:08:01 +02:00
Sam Brannen e7b52cf8b2 Introduce DynamicPropertyRegistrar to replace DynamicPropertyRegistry bean
Spring Boot's testing support registers a DynamicPropertyRegistry as a
bean in the ApplicationContext, which conflicts with the
DynamicPropertyRegistry registered as a bean by the Spring TestContext
Framework (TCF) since Spring Framework 6.2 M2.

To avoid that conflict and to improve the user experience for Spring's
testing support, this commit introduces a DynamicPropertyRegistrar API
to replace the DynamicPropertyRegistry bean support.

Specifically, the TCF no longer registers a DynamicPropertyRegistry as
a bean in the ApplicationContext.

Instead, users can now register custom implementations of
DynamicPropertyRegistrar as beans in the ApplicationContext, and the
DynamicPropertiesContextCustomizer now registers a
DynamicPropertyRegistrarBeanInitializer which eagerly initializes
DynamicPropertyRegistrar beans and invokes their accept() methods with
an appropriate DynamicPropertyRegistry.

In addition, a singleton DynamicValuesPropertySource is created and
registered with the Environment for use in
DynamicPropertiesContextCustomizer and
DynamicPropertyRegistrarBeanInitializer, which allows
@⁠DynamicPropertySource methods and DynamicPropertyRegistrar beans to
transparently populate the same DynamicValuesPropertySource.

Closes gh-33501
2024-09-11 17:42:04 +02:00
Juergen Hoeller 78028cde05 Upgrade to Mockito 5.13 (depends on JUnit 5.11)
See gh-33395
2024-09-11 17:20:01 +02:00
Juergen Hoeller e9f9a7ae8e Merge branch '6.1.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2024-09-11 17:17:38 +02:00
Juergen Hoeller 4e49f67ec5 Upgrade to SLF4J 2.0.16, Tomcat 10.1.29, Jetty 12.0.13, Netty 4.1.113, Undertow 2.3.17, AssertJ 3.26.3, Checkstyle 10.18.1 2024-09-11 17:16:14 +02:00
Juergen Hoeller 54dbb9f52a Upgrade to Objenesis 3.4
Closes gh-33526
2024-09-11 17:15:37 +02:00
Juergen Hoeller 042346aa6a Harmonize Reactor client class names within the http.client package
Closes gh-33382
2024-09-11 16:27:56 +02:00
Juergen Hoeller e9e5fee149 Consistently resolve exceptions for resources and handler functions
Closes gh-33381
2024-09-11 15:51:01 +02:00