Commit Graph

25883 Commits

Author SHA1 Message Date
Stephane Nicoll
df5e3f79e1 Merge branch '5.3.x' 2022-04-07 08:53:53 +02:00
Stephane Nicoll
4e9af3e277 Upgrade Java 18 in CI image 2022-04-07 08:52:43 +02:00
Stephane Nicoll
01fd489b47 Upgrade Ubuntu version in CI images 2022-04-07 08:51:48 +02:00
Arjen Poutsma
192f2becf6 Automatically clean up multipart temp files
This commit ensures that any resources created for multipart handling,
obtained via ServerWebExchange.getMultipartData(), are automatically
deleted after handling the completing the response.

Resource for parts obtained via BodyExtractors::toMultipartData and
BodyExtractors::toParts are not cleaned automatically, and
should be cleaned via Part::delete.

Closes gh-27633
2022-04-06 17:02:31 +02:00
Brian Clozel
f52920142b Merge branch '5.3.x' 2022-04-04 19:01:28 +02:00
Brian Clozel
270b167e08 Upgrade registry-image-resource in CI pipeline to 1.5.0
See spring-projects/spring-boot#30408
2022-04-04 19:01:03 +02:00
Brian Clozel
705bf78104 Consistently handle match with '*' and trailing slash
Prior to this commit, the `AntPathMatcher` would inconsistently match
pattern with trailing slashes if they contain `"**"` within their
pattern.

For example `"/en/test/"` would match `"/**/test"`, but it would not
match `"/*/test"` (as it should).

This commit fixes this behavior for better consistency.

Fixes gh-27506
2022-04-04 18:51:03 +02:00
Brian Clozel
1776f08bfe Merge branch '5.3.x' 2022-04-04 18:37:16 +02:00
GatinMI
b158110801 Fix debug log for no matching acceptableTypes 2022-04-04 18:29:01 +02:00
Sébastien Deleuze
e0090545f5 Upgrade Kotlin to 1.6.20
Closes gh-28036
2022-04-04 15:16:04 +02:00
Stephane Nicoll
0267da8d2e Polish 2022-04-04 13:52:22 +02:00
Brian Clozel
f447f9cd39 Upgrade to JDK 18 GA in CI image 2022-04-04 10:40:10 +02:00
Brian Clozel
fd1346bf66 Merge branch '5.3.x' 2022-04-01 19:25:11 +02:00
Brian Clozel
17f7a24118 Add application/graphql+json mime and media types
Closes gh-28271
2022-04-01 19:24:55 +02:00
rstoyanchev
aea39fdad3 Merge branch '5.3.x' into main 2022-04-01 17:57:48 +01:00
rstoyanchev
d518a7d8c8 AbstractListenerReadPublisher continues after 0 bytes
If we read 0 bytes, e.g. chunked encoding markup read but not the
actual data within it, don't stop reading since the server may or
may not consider it necessary to call onDataAvailable again.
Instead, we keep on reading, and although isReady likely returns
false on the next iteration, it eliminates ambiguity and ensures
the server will call onDataAvailable when more data arrives.

Closes gh-28241
2022-04-01 17:38:03 +01:00
rstoyanchev
24cd3c1f4c Revert "Disable flaky integration tests for now"
This reverts commit 1627f57f1f in
preparation for fixing the root cause
2022-04-01 16:07:05 +01:00
Spring Builds
2a8c369cff Next development version (v5.3.19-SNAPSHOT) 2022-03-31 09:04:49 +00:00
Brian Clozel
afbff391d8 Merge branch '5.3.x' 2022-03-31 10:33:51 +02:00
Brian Clozel
002546b3e4 Refine PropertyDescriptor filtering
Restrict property paths under `Class` and properties of types
`ClassLoader` or `ProtectionDomain`.
2022-03-31 10:21:30 +02:00
Stephane Nicoll
9ea741364a Merge branch '5.3.x' 2022-03-31 09:47:29 +02:00
Stephane Nicoll
1627f57f1f Disable flaky integration tests for now 2022-03-31 09:46:36 +02:00
Sam Brannen
02d3e00d33 Merge branch '5.3.x'
# Conflicts:
#	spring-core/src/main/java/org/springframework/util/SerializationUtils.java
2022-03-29 15:28:19 +02:00
Sam Brannen
3811cd4c0a Introduce warnings in documentation of SerializationUtils
Closes gh-28246
2022-03-29 15:22:30 +02:00
Sam Brannen
7a1421cb0f Suppress deprecation warnings in tests 2022-03-29 15:04:58 +02:00
Sam Brannen
c8d0146bcc Polish contribution
See gh-28075
2022-03-29 13:39:40 +02:00
Loïc Ledoyen
7f7fb58dd0 Deprecate SerializationUtils#deserialize
Since SerializationUtils#deserialize is based on Java's serialization
mechanism, it can be the source of Remote Code Execution (RCE)
vulnerabilities.

Closes gh-28075
2022-03-29 13:07:36 +02:00
Sébastien Deleuze
e681e713d4 Initialize NativeDetector at build time
Closes gh-28244
2022-03-29 08:50:41 +02:00
Sébastien Deleuze
77a8cbcbec Remove outdated comment in NativeDetector
`-H:+InlineBeforeAnalysis` is enabled by default as of
GraalVM 21.3.
2022-03-29 08:32:02 +02:00
Sam Brannen
50973f73c7 Change link from 5.3.x to main
See gh-28228
2022-03-27 17:47:41 +02:00
Sam Brannen
e88a88cb7d Merge branch '5.3.x' 2022-03-27 17:46:39 +02:00
Sam Brannen
d927e37364 Add "Testing ORM entity lifecycle callbacks" note to Testing chapter
Closes gh-28228
2022-03-27 17:46:06 +02:00
Sam Brannen
e90225336a Use JPA from Jakarta 2022-03-27 17:01:26 +02:00
Sam Brannen
5eff9f8d7e Merge branch '5.3.x' 2022-03-27 16:53:31 +02:00
Sam Brannen
1d302bf384 Introduce tests for gh-28228 2022-03-27 16:29:45 +02:00
Stephane Nicoll
defcaae6e4 Merge branch '5.3.x' 2022-03-27 10:05:47 +02:00
Stephane Nicoll
4b150fd451 Update copyright date in reference manual
Closes gh-28237
2022-03-27 09:59:12 +02:00
Stephane Nicoll
890fa1145f Merge branch '5.3.x' 2022-03-27 09:57:47 +02:00
Stephane Nicoll
3a6016d356 Merge pull request #28238 from izeye
* pr/28238:
  Update copyright year of EvaluationTests

Closes gh-28238
2022-03-27 09:56:45 +02:00
izeye
135506f672 Update copyright year of EvaluationTests
See gh-28238
2022-03-27 09:55:58 +02:00
Juergen Hoeller
e59f39f2cc Upgrade to AspectJ 1.9.9, Caffeine 3.0.6, Hibernate ORM 5.6.7 2022-03-25 18:18:31 +01:00
Juergen Hoeller
12d8010395 Merge branch '5.3.x' 2022-03-25 18:08:55 +01:00
Juergen Hoeller
cb36ca31f6 Upgrade to ASM master 2022-03-25 18:07:12 +01:00
Juergen Hoeller
edd66d96dd Fix accidental use of deprecated setFlushMode method
Closes gh-28234
2022-03-25 18:06:39 +01:00
Juergen Hoeller
35610a535d Expose cancel(mayInterruptIfRunning) variant in ScheduledTask
Closes gh-28233
2022-03-25 18:06:31 +01:00
Sam Brannen
42a61b966b Remove TYPE_HIERARCHY_AND_ENCLOSING_CLASSES strategy for MergedAnnotations
This commit removes the deprecated TYPE_HIERARCHY_AND_ENCLOSING_CLASSES
search strategy from the MergedAnnotations model.

As a direct replacement for the TYPE_HIERARCHY_AND_ENCLOSING_CLASSES
search strategy, users can use the new fluent search API as follows.

MergedAnnotations mergedAnnotations =
   MergedAnnotations.search(TYPE_HIERARCHY)
      .withEnclosingClasses(clazz -> true) // always search enclosing classes
      .from(MyClass.class);

Note, however, that users are highly encouraged to use
ClassUtils::isInnerClass, ClassUtils::isStaticClass, or a custom
predicate other than `clazz -> true`.

Closes gh-28080
2022-03-24 16:31:12 +01:00
Sam Brannen
1fe394f11d Introduce predicate for searching enclosing classes in MergedAnnotations
Due to the deprecation of the TYPE_HIERARCHY_AND_ENCLOSING_CLASSES
search strategy (see gh-28079), this commit introduces a way for users
to provide a Predicate<Class<?>> that is used to decide when the
enclosing class for the class supplied to the predicate should be
searched.

This gives the user complete control over the "enclosing classes"
aspect of the search algorithm in MergedAnnotations.

- To achieve the same behavior as TYPE_HIERARCHY_AND_ENCLOSING_CLASSES,
  a user can provide `clazz -> true` as the predicate.

- To limit the enclosing class search to inner classes, a user can
  provide `ClassUtils::isInnerClass` as the predicate.

- To limit the enclosing class search to static nested classes, a user
  can provide `ClassUtils::isStaticClass` as the predicate.

- For more advanced use cases, the user can provide a custom predicate.

For example, the following performs a search on MyInnerClass within the
entire type hierarchy and enclosing class hierarchy of that class.

MergedAnnotations mergedAnnotations =
   MergedAnnotations.search(TYPE_HIERARCHY)
      .withEnclosingClasses(ClassUtils::isInnerClass)
      .from(MyInnerClass.class);

In addition, TestContextAnnotationUtils in spring-test has been
revised to use this new feature where feasible.

Closes gh-28207
2022-03-24 15:40:44 +01:00
Brian Clozel
7161940b53 Merge branch '5.3.x' 2022-03-24 13:44:38 +01:00
Yanming Zhou
acf2955b96 Ban jetbrains annotations imports
Closes gh-28226
2022-03-24 13:31:36 +01:00
Arjen Poutsma
72e7ae60d4 Polish Javadoc for AbstractClientHttpResponse 2022-03-23 16:00:15 +01:00