Commit Graph

31023 Commits

Author SHA1 Message Date
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
Juergen Hoeller
a044357c31 Apply lenient locking fallback to singleton pre-instantiation phase only
Closes gh-33463
2024-09-11 14:09:57 +02:00
rstoyanchev
1ff2678147 Add UrlHandlerFilter for WebFlux
Closes gh-32830
2024-09-11 11:51:21 +01:00
rstoyanchev
5671744a94 Refactoring in UrlHandlerFilterTests 2024-09-11 11:51:21 +01:00
Patrick Strawderman
7827188e8e Avoid empty array allocations in AnnotationTypeMapping
Closes gh-33507
2024-09-11 09:49:39 +02:00
Brian Clozel
2b9b581024 Add streaming support to MVC functional endpoints
Prior to this commit, MVC function endpoints would allow Server Sent
Event responses through `ServerResponse.sse()`. While this covers a
common use case for streaming responses, other technologies would
benefit from a "low-level", unopinionated streaming support.

This commit introduces a new `BodyBuilder.stream()` methods that enables
such use cases. Developers are in charge of setting the relevant HTTP
response headers beforehand, and then can write to the response as raw
`String`, `byte[]` or using complex objects and the configured message
converters for serialization.

Because each streaming protocol has different message separator
semantics, it is also the developers' responsibility to flush buffered
content to the network once a message has been fully written.

Closes gh-32710
2024-09-10 15:41:21 +02:00
Stéphane Nicoll
6c8a859937 Merge branch '6.1.x' 2024-09-10 15:21:17 +02:00
Stéphane Nicoll
0fec2cf17a Upgrade to Reactor 2024.0.0-M6
Closes gh-33521
2024-09-10 15:10:59 +02:00
Stéphane Nicoll
f1f69544b7 Upgrade to Micrometer 1.14.0-M3
Closes gh-33520
2024-09-10 15:10:12 +02:00
Stéphane Nicoll
34f649c3f5 Upgrade to Reactor 2023.0.10
Closes gh-33519
2024-09-10 15:05:08 +02:00
Stéphane Nicoll
5b01f31387 Upgrade to Micrometer 1.12.10
Closes gh-33518
2024-09-10 15:04:42 +02:00
rstoyanchev
88ff5e1dcc Remove unused imports 2024-09-10 13:36:16 +01:00
rstoyanchev
ebef599146 Fix checkstyle violations 2024-09-10 13:05:57 +01:00
rstoyanchev
9d57c0ba89 Add compare method to ETag
Closes gh-33385
2024-09-10 12:29:33 +01:00
rstoyanchev
19700d07b1 Quote ETag if not quoted in HttpHeaders#setETag
This aligns HttpHeaders with other places like ServletWebRequest and
DefaultWebExchange where an ETag is accepted as input.

It also allows us to remove quoting from places that delegate to
HttpHeaders#setETag since it now does that internally.

Closes gh-33412
2024-09-10 09:17:56 +01:00
rstoyanchev
3dd4a8350a Update more places to use quoteETagIfNecessary
Closes gh-33412
2024-09-10 08:56:03 +01:00
rstoyanchev
1b26122e64 Polishing and minor refactoring
Update checks whether quoting is needed to be more complete
than what we've used so far, making sure the there is both
opening and closing quotes independent of each other.

See gh-33412
2024-09-10 08:56:01 +01:00
hyunmin0317
80b264ba82 Refactor eTag formatting into utility method
See gh-33412
2024-09-10 08:55:39 +01:00
Sébastien Deleuze
cc3f4b87ff Update mime.types
This commit updates mime.types based on revision 1918129 of
https://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types.

Closes gh-33512
2024-09-09 19:23:57 +02:00
Sébastien Deleuze
413cbca2c0 Remove commented entries from mime.types
See gh-33512
2024-09-09 18:59:29 +02:00
Sébastien Deleuze
b0b5fcea0e Merge branch '6.1.x' 2024-09-09 18:44:22 +02:00
Sébastien Deleuze
9150c81d92 Document fixed rate scheduling with CRaC
Closes gh-33490
2024-09-09 18:43:55 +02:00
Sam Brannen
eff19ec972 Sync MockHttpServletRequest implementations 2024-09-09 15:42:21 +02:00
Sam Brannen
d5f1e055d5 Merge branch '6.1.x' 2024-09-09 15:35:36 +02:00
Sam Brannen
4e1756d738 Polishing 2024-09-09 15:34:00 +02:00
Stéphane Nicoll
e311d9848a Expose the uriTemplate used to build a MockHttpServletRequest
This commit exposes the unexpanded URI template used to build a
MockHttpServletRequest. This allows MockMvc users to retrieve that
information, in consistency with ExchangeResult in WebTestClient.

Closes gh-33509
2024-09-09 14:46:05 +02:00
rstoyanchev
d2b25c0378 Merge branch '6.1.x' 2024-09-09 11:56:21 +01:00
rstoyanchev
5c1ab7ecd5 Polishing contribution
Closes gh-33498
2024-09-09 11:55:15 +01:00
yfoelsin
7655329463 Set status code on DefaultRenderingBuilder for RedirectView
See gh-33498
2024-09-09 11:54:50 +01:00
rstoyanchev
3d1bf28445 Refine how async request state lock is obtained
Rather than waiting indefinitely, keep checking if the state
changed from ASYNC (e.g. to ERROR).

Closes gh-33421
2024-09-09 11:54:38 +01:00
Sam Brannen
6518a56cee Revise introductory content for MockMvc 2024-09-08 17:59:15 +02:00
Sam Brannen
4fb70b671a Remove obsolete role attributes for tab groups in the reference manual
Since we now use asciidoctor-tabs instead of spring-asciidoctor-backends,
we no longer need the `role="primary"` and `role="secondary"` attributes
for tab groups.

Closes gh-33506
2024-09-08 17:20:10 +02:00
Brian Clozel
761fb8f6c9 Allow multiple listeners on ResponseBodyEmitter
Prior to this commit, `ResponseBodyEmitter` woud accept a single
`Runnable` callback on each of its `onTimeout`, `onError` or
`onCompletion` methods. This would limit the developers' ability to
register multiple sets of callbacks: one for managing the publication of
streaming values, another one for managing other concerns like
keep-alive signals to maintain the connection.

This commit now allows multiple calls to `onTimeout`, `onError` and
`onCompletion` and will register all callbacks accordingly.

Closes gh-33356
2024-09-06 15:30:18 +02:00
Patrick Strawderman
2b6639e587 Avoid storing duplicate empty array in MethodParameter field
Avoid storing duplicate empty arrays in the parameterAnnotations field of MethodParameter.

Closes gh-33496
2024-09-06 10:02:02 +02:00
Brian Clozel
e9b0a19d3f Document TaskDecorator usage with TaskExecutors
Closes gh-33438
2024-09-05 21:04:22 +02:00
Sam Brannen
d1920c0982 Merge branch '6.1.x' 2024-09-05 17:46:20 +02:00
Johnny Lim
b7c7823315 Add @⁠since tag for CodeWarnings.detectDeprecation(ResolvableType)
See gh-32850
Closes gh-33493
2024-09-05 17:45:52 +02:00
Brian Clozel
046724b940 Document that WebFlux does not support forward redirects
Closes gh-33441
2024-09-05 16:02:42 +02:00
Sébastien Deleuze
5e3c5d466f Avoid collecting Flux elements in KotlinSerializationJsonEncoder
Closes gh-33428
2024-09-05 14:47:49 +02:00