Commit Graph

29075 Commits

Author SHA1 Message Date
Juergen Hoeller
5656eaccb7 Avoid bridge resolution for method from unrelated class hierarchy
Closes gh-32087
2024-01-23 10:50:53 +01:00
Sam Brannen
3b2f6e74a6 Make assertions based on Annotation#toString() lenient
The behavior for the toString() implementation for annotations changed
in JDK 19, per my request to the JDK team (see link below).

Specifically, since JDK 19, the toString() implementation for annotation
proxies created by the JDK started using canonical names instead of
binary names for types.

See https://bugs.openjdk.org/browse/JDK-8281462
2024-01-23 10:41:40 +01:00
Stéphane Nicoll
484aee069e Merge pull request #32088 from Ryan-Dia
* pr/32088:
  Upgrade copyright year of changed file
  Use count in ParamsRequestCondition#getValueMatchCount

Closes gh-32088
2024-01-23 09:04:28 +01:00
Stéphane Nicoll
def7075695 Upgrade copyright year of changed file
See gh-32088
2024-01-23 09:00:41 +01:00
ryan-dia
2daa074561 Use count in ParamsRequestCondition#getValueMatchCount
See gh-32088
2024-01-23 08:59:59 +01:00
Juergen Hoeller
6bd7f0231d Avoid double exists() call for common resource resolution
See gh-30369
See gh-18990
2024-01-22 13:40:51 +01:00
Brian Clozel
70d9f7c62c Record errors thrown by custom handler in RestTemplate observations
Prior to this commit, the `RestTemplate` observation instrumentation
would only record `RestClientException` and `IOException` as errors in
the observation. Other types of errors can be thrown by custom
components, such as `ResponseErrorHandler` and in this case they aren't
recorded with the observation.
Also, the current instrumentation does not create any observation scope
around the execution. While this would have a limited benefit as no
application code is executed there, developers could set up custom
components (such as, again, `ResponseErrorHandler`) that could use
contextual logging with trace ids.

This commit ensures that all `Throwable` are recorded as errors with the
observations and that an observation `Scope` is created around the
execution of the client exchange.

Fixes gh-32060
2024-01-22 11:03:57 +01:00
Sam Brannen
5856d2e54e Polish contribution
See gh-32069
2024-01-21 16:27:59 +01:00
mnhock
a8fa98e2a6 Remove unnecessary semicolons in enum declarations
Closes gh-32069
2024-01-21 16:25:36 +01:00
Stéphane Nicoll
73725905ba Merge pull request #32072 from mnhock
* pr/32072:
  Use 'Map.getOrDefault' rather than explicit check with fallback

Closes gh-32072
2024-01-20 14:42:50 +01:00
mnhock
1e71d3d363 Use 'Map.getOrDefault' rather than explicit check with fallback
See gh-32072
2024-01-20 14:37:23 +01:00
Stéphane Nicoll
c3127249ac Merge pull request #32071 from mnhock
* pr/32071:
  Upgrade copyright year of changed file
  Remove unnecessary conversion to 'String'

Closes gh-32071
2024-01-20 14:35:19 +01:00
Stéphane Nicoll
91b980f5cb Upgrade copyright year of changed file
See gh-32071
2024-01-20 14:35:10 +01:00
mnhock
d9e86dd68c Remove unnecessary conversion to 'String'
See gh-32071
2024-01-20 14:33:39 +01:00
Stéphane Nicoll
11c8b22c5a Polish 2024-01-20 14:26:48 +01:00
Sam Brannen
1a52c56bd4 Polishing 2024-01-19 19:16:41 +01:00
Sam Brannen
4cc91a2869 Ensure inherited @⁠HttpExchange annotation can be overridden in controller
This commit revises the RequestMappingHandlerMapping implementations in
Spring MVC and Spring WebFlux to ensure that a @⁠Controller class which
implements an interface annotated with @⁠HttpExchange annotations can
inherit the @⁠HttpExchange declarations from the interface or
optionally override them locally with @⁠HttpExchange or
@⁠RequestMapping annotations.

Closes gh-32065
2024-01-19 18:54:31 +01:00
Sébastien Deleuze
17cef18760 Upgrade Antora extensions versions
Sync with the versions used in the docs-build
branch.

See gh-32044
2024-01-19 18:36:43 +01:00
Juergen Hoeller
00bda65848 Polishing 2024-01-19 17:09:58 +01:00
Sam Brannen
6697461003 Reject mixed @⁠RequestMapping and @⁠HttpExchange declarations in MVC & WebFlux
This commit updates the RequestMappingHandlerMapping implementations in
Spring MVC and Spring WebFlux so that mixed @⁠RequestMapping and
@⁠HttpExchange declarations on the same element are rejected.

Note, however, that a @⁠Controller class which implements an interface
annotated with @⁠HttpExchange annotations can still inherit the
@⁠HttpExchange declarations from the interface or optionally override
them locally with @⁠HttpExchange or @⁠RequestMapping annotations.

See gh-31962
See gh-32049
Closes gh-32065
2024-01-19 16:23:42 +01:00
Arjen Poutsma
c820e44a99 Unwrap request factory when creating RestClient from RestTemplate
This commit makes sure that, when building a RestClient based on the
configuration of a RestTemplate, the request factory is unwrapped if it
is a InterceptingClientHttpRequestFactory.

Closes gh-32038
2024-01-19 15:41:31 +01:00
Stéphane Nicoll
472dcdb59c Allow JPA entities to be filtered
This commit provides more control over JPA entities scanning by allowing
the result to be filtered.

Closes gh-27892
2024-01-19 15:38:53 +01:00
Sam Brannen
6691ff2072 Reject multiple @⁠HttpExchange declarations in HTTP interface clients
This commit updates HttpServiceMethod so that multiple @⁠HttpExchange
declarations on the same element (class or method) are rejected.

Closes gh-32049
2024-01-19 13:02:41 +01:00
Stéphane Nicoll
9c6e55939e Improve toString of ExponentialBackOff
Closes gh-32061
2024-01-19 12:10:36 +01:00
Stéphane Nicoll
7e511931b3 Merge pull request #32057 from erichaagdev
* pr/32057:
  Rename Gradle enterprise badge to Develocity

Closes gh-32057
2024-01-19 10:01:00 +01:00
Eric Haag
4bd898c359 Rename Gradle enterprise badge to Develocity
See gh-32057
2024-01-19 10:00:00 +01:00
rstoyanchev
1fba430dfc Update HttpExchange Javadoc to mention uses
See gh-32008
2024-01-18 18:35:28 +00:00
Sam Brannen
efe85c0d70 Remove tautological ternary statement 2024-01-18 17:30:07 +01:00
Sam Brannen
2ec0c16889 Polishing 2024-01-18 17:30:07 +01:00
Stéphane Nicoll
899de4f3bf Upgrade SDK env to Java 17.0.10
See b9d366d203
2024-01-18 16:39:11 +01:00
Sam Brannen
d1d9d483fe Document @⁠HttpExchange support in RequestMappingHandlerMapping 2024-01-18 16:28:40 +01:00
Arjen Poutsma
375e0e6827 Handle Content-Length in ShallowEtagHeaderFilter more robustly
This commit ensures that setting the Content-Length through
setHeader("Content-Length", x") has the same effect as calling
setContentLength in the ShallowEtagHeaderFilter. It also filters out
Content-Type headers similarly to Content-Length.

Closes gh-32039
2024-01-18 15:42:16 +01:00
Sam Brannen
b8b31ff8a1 Reject multiple @⁠HttpExchange declarations in MVC and WebFlux
This commit updates the RequestMappingHandlerMapping implementations in
Spring MVC and Spring WebFlux so that multiple @⁠HttpExchange
declarations on the same element are rejected.

Closes gh-32049
2024-01-18 15:29:30 +01:00
Sam Brannen
c5c77b93fe Polishing 2024-01-18 15:29:30 +01:00
Sam Brannen
6b905049eb Polishing
See gh-31962
2024-01-18 14:21:45 +01:00
Sébastien Deleuze
88a7ca0b0a Rename class-data-sharing.adoc to cds.adoc
Closes gh-32044
2024-01-18 10:16:45 +01:00
Brian Clozel
e8012a64c3 Upgrade CI image to Ubuntu Jammy 20240111 2024-01-17 21:30:59 +01:00
Brian Clozel
b9d366d203 Upgrade CI to JDK 17.0.10+13 21.0.2+14 and 22-ea+31 2024-01-17 21:29:50 +01:00
Stéphane Nicoll
f5b0d9509d Polish 2024-01-17 18:41:15 +01:00
Sam Brannen
699da7c383 Log warning if multiple @⁠RequestMapping annotations are declared
If multiple request mapping annotations are discovered, Spring MVC and
Spring WebFlux now log a warning similar to the following (without
newlines).

Multiple @⁠RequestMapping annotations found on
void org.example.MyController.put(), but only the first will be used:
[
@⁠org.springframework.web.bind.annotation.PutMapping(consumes={}, headers={}, name="", params={}, path={"/put"}, produces={}, value={"/put"}),
@⁠org.springframework.web.bind.annotation.PostMapping(consumes={}, headers={}, name="", params={}, path={"/put"}, produces={}, value={"/put"})
]

Closes gh-31962
2024-01-17 17:46:31 +01:00
Sam Brannen
5bf74cae11 Polish documentation for @⁠RequestMapping 2024-01-17 17:46:26 +01:00
Sam Brannen
46128cb4b9 Delete duplicate content 2024-01-17 17:45:17 +01:00
Sébastien Deleuze
5dd48fc068 Mention PathPattern in functional router Javadoc
This commit makes the various supported patterns
more discoverable.

Closes gh-32045
2024-01-17 15:08:34 +01:00
Arjen Poutsma
0ada78ad84 Enable RestClient.defaultRequest
This commit enables the defaultRequest setting in the RestClient
builder.

Closes gh-32028
2024-01-17 11:23:50 +01:00
rstoyanchev
682f4715cf Polishing
See gh-30393
2024-01-17 10:15:09 +00:00
rstoyanchev
c4a34fa26c Improve cancel handling in AbstractListenerReadPublisher
Closes gh-30393
2024-01-17 10:15:09 +00:00
Stéphane Nicoll
e3f185a696 Upgrade to Gradle Enterprise Plugin 3.15
This reverts commit e1c8a84fec as our
version of Gradle Enterprise is not yet compatible with it.
2024-01-17 08:12:42 +01:00
Stéphane Nicoll
1b312b6f3f Polish 2024-01-16 18:45:59 +01:00
Stéphane Nicoll
dc5a21fbd1 Remove outdated note
See gh-20606
2024-01-16 16:43:28 +01:00
Sam Brannen
e1c8a84fec Upgrade com.gradle.enterprise plugin to 3.16.1 2024-01-16 15:58:22 +01:00