Commit Graph

25945 Commits

Author SHA1 Message Date
Sam Brannen 9d73f81e9c Avoid String allocations with Assert.notNull() 2022-11-08 14:23:22 +01:00
Sam Brannen 9e4cddf5db Fix precondition assertions 2022-11-08 14:21:58 +01:00
Sam Brannen d0b162a76c Polishing 2022-11-08 14:16:00 +01:00
Sam Brannen 95f3337bb5 Revise contribution
This commit reverts changes to AbstractCacheManager since iterating
over the caches in a for-loop and a stream is duplicated effort.

This commit reverts changes to DefaultRenderingResponseBuilder,
RouterFunctions, and OriginHandshakeInterceptor since order matters for
those use cases: they were originally based on the semantics of
LinkedHashSet or LinkedHashMap; whereas, Set.copyOf() and Map.copyOf()
do not provide any guarantees regarding ordering.

This commit also applies analogous changes to "sibling" implementations
across Servlet mocks as well as Web MVC and WebFlux.

See gh-29321
2022-11-08 14:14:29 +01:00
divcon ba136dcf40 Replace use of Collections.unmodifiable*() methods where appropriate
Closes gh-29321
2022-11-08 13:51:31 +01:00
Juergen Hoeller 86d45578d9 Introduce findAllAnnotationsOnBean variant on ListableBeanFactory
Closes gh-29446
2022-11-08 13:29:33 +01:00
Sam Brannen e1010a179f Merge branch '5.3.x'
# Conflicts:
#	spring-context/src/test/java/org/springframework/context/annotation/Gh29105Tests.java
2022-11-08 12:27:40 +01:00
Sam Brannen e5878ab15b Fix precondition assertions 2022-11-08 12:08:08 +01:00
Sam Brannen dedbbf0a79 Avoid warnings in tests 2022-11-08 12:04:56 +01:00
Sam Brannen 3438c47744 Polishing 2022-11-08 11:48:13 +01:00
rstoyanchev aeb35663d4 Remove deprecated methods in HttpServiceProxyFactory 2022-11-07 16:57:17 +00:00
Juergen Hoeller a2ac764f9c Reuse StandardWebSocketUpgradeStrategy as a base class for Tomcat etc
Includes non-reflective instantiation of well-known strategy classes.

See gh-29436
2022-11-07 17:35:31 +01:00
Arjen Poutsma 465575f8f2 Upgrade to Woodstox 6.4.0 2022-11-07 15:40:19 +01:00
Johnny Lim 710cf1f486 Use ObservationThreadLocalAccessor.KEY where possible
Closes gh-29439
2022-11-07 15:39:28 +01:00
Brian Clozel 287d6dec8b Upgrade to Context Propagation 1.0.0
Closes gh-29442
2022-11-07 11:07:12 +01:00
Brian Clozel 19d68a42f8 Upgrade to Micrometer 1.10.0
Closes gh-29441
2022-11-07 11:07:12 +01:00
Juergen Hoeller 19cf503534 Align with Servlet 6.0 and introduce support for Jakarta WebSocket 2.1
Includes corresponding build upgrade to Tomcat 10.1.1 and Undertow 2.3.0
(while retaining runtime compatibility with Tomcat 10.0 and Undertow 2.2)

Closes gh-29435
Closes gh-29436
2022-11-06 16:08:30 +01:00
Brian Clozel 4b22a4a0d8 Merge PDF reference documentation into single file
This commit configures the documentation build to merge the entire
reference documentation into a single PDF file.

To achieve that, this commit also fixes duplicate anchors that were
introduced while factoring out common parts of the documentation for MVC
and WebFlux.

Closes gh-28451
2022-11-06 14:56:53 +01:00
Arjen Poutsma af8518ab1e Upgrade to Jackson 2.14.0
This commit upgrades Jackson to 2.14.0.

Closes gh-29351
2022-11-06 12:21:56 +01:00
Andy Wilkinson 95395b53d5 Make WebSocket upgrade strategies compatible with Tomcat 10.1 2022-11-06 00:30:35 +01:00
Sam Brannen ac5eb9bfd3 Avoid String allocations with Assert.isTrue() 2022-11-05 14:51:36 +01:00
Sam Brannen 82823517fa Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterBuilder.java
#	spring-messaging/src/main/java/org/springframework/messaging/rsocket/MetadataEncoder.java
#	spring-messaging/src/main/java/org/springframework/messaging/simp/broker/OrderedMessageChannelDecorator.java
#	spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolver.java
#	spring-test/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java
#	spring-web/src/main/java/org/springframework/http/HttpRange.java
#	spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java
#	spring-webflux/src/main/java/org/springframework/web/reactive/socket/CloseStatus.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/RedirectViewControllerRegistration.java
2022-11-05 14:50:18 +01:00
Sam Brannen 4207c4d757 Suppress warnings in tests 2022-11-05 14:44:36 +01:00
Sam Brannen 5f02323b9c Avoid String allocations with Assert.isTrue() 2022-11-05 14:40:45 +01:00
Sam Brannen 902cdd1a2f Ignore spring-core-test from main branch in nohttp checks 2022-11-05 14:39:50 +01:00
Sam Brannen 2afcf60566 Avoid String allocations with Assert.state() 2022-11-04 16:44:59 +01:00
Sam Brannen fff999f416 Polishing 2022-11-04 16:44:33 +01:00
Sam Brannen d849f9816a Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/ScriptTemplateViewTests.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/view/script/ScriptTemplateView.java
#	spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/ScriptTemplateViewTests.java
2022-11-04 16:29:54 +01:00
Sam Brannen deabd66939 Avoid String allocations with Assert.state() 2022-11-04 16:24:59 +01:00
Christoph Dreis 2a853aea67 Avoid String allocations in MediaType.checkParameters
Closes gh-29428
2022-11-04 16:24:59 +01:00
Sam Brannen a281d8c3fd Polishing 2022-11-04 16:24:59 +01:00
Sam Brannen 638d91f5f4 Ignore framework-docs from main branch in nohttp check 2022-11-04 16:22:01 +01:00
Sam Brannen 34b1857236 Avoid String allocations with Assert.state() 2022-11-04 15:51:32 +01:00
Brian Clozel 6022065ad3 Rename web observation documentation
Prior to this commit, several variants of observation documentation
would share the same name; for example HTTP client observations for both
blocking and reactive clients would have the same name.

While it is required that they have the same metric name for dashboards,
the observation documentation names should be different so that they can
be documented without confusing developers.

This commit renames the observation documentation names to avoid that.

Closes gh-29431
2022-11-04 15:38:32 +01:00
Sam Brannen d492086c76 Polishing 2022-11-03 16:02:19 +01:00
Brian Clozel 151977259c Revert "Upgrade CI image to Ubuntu Jammy"
This reverts commit 05c997802b.

It seems we need to update our docker infrastructure on the host first
before upgrading to Ubuntu Jammy.
2022-11-03 12:54:52 +01:00
Brian Clozel a94b0e51e2 Align server contextual names with OTel conventions
This commit ensures that the matching path pattern for the request being
observed is used in the conytextual name, as advised in the OTel HTTP
server semantic conventions.

If the path pattern is not available, no additional value is provided
and the "http {method}" baseline is being used.

Fixes gh-29424
2022-11-02 20:57:41 +01:00
Brian Clozel db79d1d2b9 Set matching pattern in reactive server observation context
This commit fixes the observation instrumentation for the reactive HTTP
server by setting the best matching pattern determined by the web
framework into the `ServerRequestObservationContext`.

This information is required by the observation convention for creating
the expected `KeyValue` for the matching pattern. Prior to this commit,
the information was missing and resulted in an UNKNOWN key value.

Fixes gh-29422
2022-11-02 19:02:31 +01:00
Brian Clozel 05c997802b Upgrade CI image to Ubuntu Jammy 2022-11-02 16:38:03 +01:00
Brian Clozel 38e84a76f9 Upgrade JDK versions in CI image 2022-11-02 16:37:46 +01:00
Brian Clozel c35cd80b84 Upgrade to GitHub Changelog Generator 0.0.8 2022-11-02 16:28:47 +01:00
Brian Clozel 3c049a2bd0 Polish
See gh-29388
2022-11-02 16:26:01 +01:00
Marcin Grzejszczak c03ccb2e6c Propagate context in reactive HTTP server and client
Prior to this commit, the ServerHttpObservationFilter would not add
the current observation as a key in the Reactor context, preventing
from being used or propagated during the HTTP exchange handling.

Also, the client instrumentation in `DefaultWebClient` would start
the observation once the request is fully formed and immutable,
preventing the context from being propagated through HTTP request
headers.

This commit fixes both uses cases now by:

* adding the current observation as a key in the reactor context
  on the server side
* using the `ClientRequest.Builder` as a Carrier on the client side

Closes gh-29388
2022-11-02 16:25:50 +01:00
Sam Brannen 396336fdcc Merge branch '5.3.x' 2022-11-02 15:32:55 +01:00
Sam Brannen 6abfe041b1 Ignore /framework-docs/build folder from main branch 2022-11-02 15:32:16 +01:00
Roy Lee 462d33e68d Fix typo in WebSocket reference doc regarding subscription header
Closes gh-29228
2022-11-02 15:28:43 +01:00
Arjen Poutsma 2042cb68a5 Merge two DispatcherHandlerIntegrationTests 2022-11-02 14:48:58 +01:00
Arjen Poutsma 9e306151c7 Use case-insensitive check for request conditions
This commit ensures that the ConsumesRequestCondition and
ProducesRequestCondition use a case insensitive check when comparing
parameters.

Closes gh-29416
2022-11-02 14:29:50 +01:00
rstoyanchev 481389f761 Support `@RequestPart` for `@HttpExchange` methods
Closes gh-29420
2022-11-02 13:26:49 +00:00
rstoyanchev 4b647a1801 Minor refactoring in AbstractNamedValueArgumentResolver
Expose MethodParameter information in abstract protected method that
adds the HTTP request value.

See gh-29420
2022-11-02 13:26:49 +00:00