Commit Graph

25611 Commits

Author SHA1 Message Date
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
Sam Brannen 723e09c164 Polishing
See gh-29408
2022-11-02 12:46:44 +01:00
Kulwant Singh 5245327962 Fix tests and checkstyle violations
See gh-29408
2022-11-02 12:46:44 +01:00
Kulwant Singh 20d0becbc6 Fix Javadoc links
See gh-29408
2022-11-02 12:46:44 +01:00
Kulwant Singh 5f2a6fd7f1 Use List.of() instead of Arrays.asList() where appropriate
See gh-29408
2022-11-02 12:46:44 +01:00
Kulwant Singh eec3c6f7bb Replace concatenated strings with text blocks
See gh-29408
2022-11-02 12:46:44 +01:00
Kulwant Singh 19955c5b77 Remove unnecessary calls to toString()
See gh-29408
2022-11-02 12:46:44 +01:00
Kulwant Singh bd57d860d2 Use StandardCharsets
See gh-29408
2022-11-02 12:46:44 +01:00
Sébastien Deleuze c091bbdeaa Merge branch '5.3.x' 2022-11-02 12:18:15 +01:00
Steve Gerhardt fded79d807 Make SimpleMailMessage setters parameters nullable
Closes gh-29139
2022-11-02 12:18:03 +01:00
Sébastien Deleuze c14cbd07f4 Use non-null DateFormat for CustomDateEditor in tests
Closes gh-29419
2022-11-02 12:01:49 +01:00
Brian Clozel 676f163546 Fix Artifactory configuration for docs deployment
This commit aligns the Artifactory configuration with the changes
applied in gh-29417.
In order to be deployed, docs artifacts must have specific properties
attached to them.

See gh-29417
2022-11-02 11:42:49 +01:00
Sébastien Deleuze aa2d7dba5b Merge branch '5.3.x' 2022-11-02 11:16:35 +01:00
Christoph Dreis 58bb6e7181 Reduce allocations caused by producible media types
Closes gh-29412
2022-11-02 11:15:26 +01:00
Brian Clozel 21414bc265 Move Kotlin Gradle build config to convention
This commit moves the Kotlin build configuration from the Gradle DSL
to a dedicated convention in buildSrc.
2022-11-02 10:59:39 +01:00
Brian Clozel acd9016fc3 Create framework-docs module
This commit creates a new "framework-docs" module, which is dedicated to
documentation generation (reference and API docs).
This commit refactors the build configuration and moves the asciidoc
files to a separate location, but does not change the name nor the
nature of published artifacts.

Closes gh-29417
2022-11-02 10:59:12 +01:00
Sébastien Deleuze 403cfefc28 Add AOT processing of bean aliases
This commit adds AOT processing of bean aliases.

Closes gh-29391
2022-11-02 10:07:21 +01:00
Sébastien Deleuze bfe37c290e Refine PreComputeFieldFeature logging
Closes gh-29406
2022-11-02 07:57:49 +01:00
Arjen Poutsma 6e9fbcc243 Improve PartEvent documentation
Add note about the necessity of consuming the PartEvent content.

See gh-29400
2022-11-01 17:20:01 +01:00
Arjen Poutsma 0ef96b893b Filter out empty PartEvents in PartEventHttpMessageWriter
This commit makes sure that PartEvents with empty data buffer are
filtered out before written. Empty buffers caused issues with the
JdkClientHttpConnector.

Closes gh-29400
2022-11-01 16:24:35 +01:00
Johnny Lim 85d029f7c3 Polishing
Closes gh-29410
2022-11-01 15:22:49 +01:00
rstoyanchev 5ef3aab3fe Warn about ResponseEntity-ProblemDetail status mismatch
Closes gh-29378
2022-11-01 14:10:39 +00:00
rstoyanchev 921eeadff4 Minor refactoring after recent commits
See gh-29384
2022-11-01 13:56:40 +00:00
rstoyanchev e71057dca9 Support i8n of ProblemDetail "title" field
Closes gh-29407
2022-11-01 12:42:34 +00:00
rstoyanchev 506fbe5243 Improve mapping any Exception to ErrorResponse
Add protected, convenience method in ResponseEntityExceptionHandler
to create a ProblemDetail for any exception, along with a
MessageSource lookup for the "detail" field.

Closes gh-29384
2022-11-01 12:42:34 +00:00
Sam Brannen 210019cad1 Polish contribution
See gh-29379
2022-11-01 11:41:41 +01:00
Mahmoud Ben Hassine 39f24f0244 Introduce DataFieldMaxValueIncrementer for MariaDB
Closes gh-29379
2022-11-01 11:27:34 +01:00
Sam Brannen c3fca0a826 Always register root directory for registered resource hints
See gh-29403
2022-10-31 14:21:07 +01:00
Arjen Poutsma ca33752267 Upgrade to Jackson 2.14.0-rc3
This commit upgrades Jackson to 2.14.0-rc3, which resolves two
outstanding issues Spring Framework had with rc2. This commit reverts
the changes made due to those issues, see
https://github.com/FasterXML/jackson-core/issues/824, and
https://github.com/FasterXML/jackson-module-kotlin/issues/582.

Closes gh-29405
2022-10-31 10:35:10 +01:00
Sébastien Deleuze bf3b7b82c1 Merge branch '5.3.x' 2022-10-31 09:07:52 +01:00
David Costanzo e1df056059 Fix typo: "as describe in" -> "as described in" 2022-10-31 09:07:39 +01:00
Sam Brannen 29f085bd1a Automatically register directories for registered resource hints
When a hint such as `graphql/*.*` is registered for resources that are
looked up via classpath scanning using a pattern such as
`classpath*:graphql/**/*.graphqls`, an appropriate pattern is in fact
registered in the generated `resource-config.json` file for GraalVM
native images; however, classpath scanning fails since GraalVM
currently does not make the `graphql` directory automatically available
as a classpath resource.

This can be very confusing and cumbersome for users since a file such
as `graphql/schema.graphqls` will not be discovered via classpath
scanning even though the file is present in the native image filesystem.

To address this, this commit automatically registers resource hints for
enclosing directories for a registered pattern.

If the GraalVM team later decides to perform automatic directory
registration, we can then remove the code introduced in conjunction
with this issue.

Closes gh-29403
2022-10-30 19:02:39 +01:00
Sam Brannen d03102edc3 Allow registration of resource hint for root directory
Prior to this commit, it was not possible to register the root
directory as a native image resource; however, it is necessary to be
able to register the root directory to enable classpath scanning of the
root directory within a native image -- for example, to support
resource patterns such as `classpath*:/*.properties`.

This commit therefore relaxes the precondition check in the
ResourcePatternHint constructor to allow explicit registration of the
root directory.

Closes gh-29402
2022-10-30 18:18:07 +01:00
Sam Brannen 3c42363ba4 Do not close GraalVM Native image FileSystem after classpath scanning
As can be seen in a modified version of the following example project,
attempting to access a resource discovered via classpath scanning
within a GraalVM native image -- for example via the Files.exists(...)
invocation in FileSystemResource -- currently results in a
ClosedFileSystemException since PathMatchingResourcePatternResolver
explicitly closes the native image FileSystem that backs `resource:`
resources.

Sample project: https://github.com/joshlong/spring-boot-3-aot-graphql

To address this issue, this commit removes the explicit close()
invocation for custom FileSystems after classpath scanning in
PathMatchingResourcePatternResolver.

See https://github.com/spring-projects/spring-graphql/issues/495
Closes gh-29397
2022-10-28 21:23:03 +02:00
Arjen Poutsma 2ccfc7068e Merge branch '5.3.x' 2022-10-28 11:33:57 +02:00