Commit Graph

27292 Commits

Author SHA1 Message Date
Juergen Hoeller
ee3e1591de Polishing 2024-05-14 13:03:35 +02:00
Juergen Hoeller
e81c788274 Accept ajc-compiled @Aspect classes for Spring AOP proxy usage
AspectJExpressionPointcut leniently ignores unsupported expression.

Closes gh-32793
2024-05-14 13:03:29 +02:00
rstoyanchev
09f23a578b Update docs on HandlerInterceptor
Closes gh-32729
2024-05-13 12:10:52 +01:00
rstoyanchev
5288504ceb Use instance field for ProblemDetail in ErrorResponse's
Closes gh-32644
2024-05-13 12:10:52 +01:00
rstoyanchev
8b6a54c45f Update MockMvc section on Streaming in the docs
Closes gh-32687
2024-05-13 12:10:52 +01:00
Sam Brannen
f3f3063091 Fix Dokka links to Spring Framework and Servlet APIs
This commit fixes links from Spring Framework's Dokka HTML to Javadoc
for Spring Framework and Servlet APIs by explicitly configuring the
`element-list` page as the `package-list` in the Dokka Gradle plugin.

Closes gh-32797

(cherry picked from commit 7536980be9)
2024-05-12 12:33:00 +02:00
Stéphane Nicoll
c1f3e37acd Polish 2024-05-08 15:35:41 +02:00
Stéphane Nicoll
427a96befc Adapt docs deployment properties
This commit fixes the artifact properties we set for "framework-docs"
artifacts. These have a different name as of 6.1.x and were backported
as is.

Closes gh-32780
2024-05-08 15:21:47 +02:00
Juergen Hoeller
77951dc622 Consistent RuntimeHintsRegistrar signature (plus related polishing) 2024-05-07 15:43:17 +02:00
Juergen Hoeller
43dd22ba31 Polishing
(cherry picked from commit 05d9b52b19)
2024-05-06 20:28:41 +02:00
Juergen Hoeller
dfe437ac88 Unwrap raw target Query instance in case of proxy mismatch
Closes gh-32766

(cherry picked from commit 59a125d06f)
2024-05-06 20:25:46 +02:00
Sam Brannen
9c775d2643 Fix compilation error in test 2024-05-03 12:40:14 +03:00
Sam Brannen
3b50b6ef94 Include repeatable annotation container in MergedAnnotations results
A bug has existed in Spring's MergedAnnotations support since it was
introduced in Spring Framework 5.2. Specifically, if the
MergedAnnotations API is used to search for annotations with "standard
repeatable annotation" support enabled (which is the default), it's
possible to search for a repeatable annotation but not for the
repeatable annotation's container annotation.

The reason is that MergedAnnotationFinder.process(Object, int, Object,
Annotation) does not process the container annotation and instead only
processes the "contained" annotations, which prevents a container
annotation from being included in search results.

In #29685, we fixed a bug that prevented the MergedAnnotations support
from recognizing an annotation as a container if the container
annotation declares attributes other than the required `value`
attribute. As a consequence of that bug fix, since Spring Framework
5.3.25, the MergedAnnotations infrastructure considers such an
annotation a container, and due to the aforementioned bug the container
is no longer processed, which results in a regression in behavior for
annotation searches for such a container annotation.

This commit addresses the original bug as well as the regression by
processing container annotations in addition to the contained
repeatable annotations.

See gh-29685
Closes gh-32731

(cherry picked from commit 4baad16437)
2024-05-03 12:19:27 +03:00
Juergen Hoeller
9a31f3b5a5 Consistently propagate ApplicationStartup to BeanFactory
Closes gh-32747

(cherry picked from commit 25cedcfb99)
2024-05-01 18:11:55 +02:00
Juergen Hoeller
b11d118376 Upgrade to Groovy 4.0.21, Netty 4.1.109, Undertow 2.3.13 2024-05-01 15:56:28 +02:00
Juergen Hoeller
0931769822 Polishing 2024-05-01 15:49:14 +02:00
Juergen Hoeller
f7b7e29fd7 Ignore non-String keys in PropertiesPropertySource.getPropertyNames()
Closes gh-32742

(cherry picked from commit 610626aec6)
2024-05-01 15:45:21 +02:00
Brian Clozel
08a63a4180 Fix build warnings
See gh-32726
2024-04-30 19:09:44 +02:00
Arjen Poutsma
4e3b834310 Fix guard against multiple subscriptions
This commit changes the guard against multiple subscriptions, as the
previously used doOnSubscribe hook could not function as guard in
certain scenarios.

See gh-32727
Closes gh-32732
2024-04-30 16:20:20 +02:00
Brian Clozel
fb67f97a41 Upgrade to gradle-enterprise-conventions 0.0.17
Closes gh-32726
2024-04-29 13:16:15 +02:00
Stéphane Nicoll
cafb5cfbbe Refine preDetermineBeanTypes algorithm
This commit refines the preDetermineBeanTypes algorithm that AOT uses
to approximate the order of preInstantiateSingletons more closely.

Previously, the algorithm assumed that all beans where non-lazy
singletons in terms of initialization order, which led to inconsistent
order in CGLIB proxy generation.

We now explicitly park lazy beans so that their types are determined
during a second phase, matching the order of regular initialization
order.

Closes gh-32701

Co-authored-by: Juergen Hoeller <juergen.hoeller@broadcom.com>
2024-04-24 11:09:44 +02:00
Juergen Hoeller
9d2c6f80b8 Polishing 2024-04-23 16:25:24 +02:00
Juergen Hoeller
d9330bcac7 Skip close lock if acquired by other thread already
Closes gh-32445

(cherry picked from commit d151931f86)
2024-04-23 16:11:16 +02:00
Stéphane Nicoll
1fb179b057 Relax scope of DataIntegrityViolationException
This commit updates the Javadoc of DataIntegrityViolationException to
broaden its scope as it was too specific before.

Closes gh-32686
2024-04-22 14:53:06 +02:00
Juergen Hoeller
5c9f364352 Polishing
(cherry picked from commit ec1f5ca600)
2024-04-22 14:07:51 +02:00
Juergen Hoeller
55f9581743 Try early initialization for all user-declared methods (including interfaces)
Closes gh-32682

(cherry picked from commit 62efdfb89c)
2024-04-22 13:51:15 +02:00
Stéphane Nicoll
190397d5e0 Upgrade to Java 17.0.11 2024-04-22 12:12:11 +02:00
Juergen Hoeller
94097fb112 Polishing (aligned with 6.1.x) 2024-04-18 12:46:55 +02:00
yhao3
e4ab2aa775 Update links to HttpOnly documentation at OWASP in ResponseCookie
See gh-32663
Closes gh-32667

(cherry picked from commit 7f27ba3902)
2024-04-18 12:00:10 +02:00
Simon Baslé
40bf550d56 Ensure multipart data is deleted in WebFlux when connection terminates
Before this change temporary files would not consistently be deleted
when the connection which uploads the multipart files closes naturally.

This change uses the usingWhen Reactor operator to ensure that the
termination of the connection doesn't prevent individual file parts
from being deleted due to a cancellation signal.

See gh-31217
Closes gh-32638
2024-04-15 14:22:42 +02:00
Spring Builds
f3bdce455e Next development version (v6.0.20-SNAPSHOT) 2024-04-11 07:56:46 +00:00
Brian Clozel
402246df28 Refine UriComponentsBuilder parsing
This commit refines the expressions for the scheme, user info, host and
port parts of the URL in UriComponentsBuilder to better conform to
RFC 3986.

Fixes gh-32617
2024-04-11 08:50:23 +02:00
Stéphane Nicoll
88a68ddbd2 Upgrade to Reactor 2022.0.18
Closes gh-32593
2024-04-09 19:54:22 +02:00
Sam Brannen
7d178c6771 Detect bridge methods across ApplicationContexts in MethodIntrospector
Prior to this commit, MethodIntrospector failed to properly detect
bridge methods for subsequent invocations of selectMethods() with the
same targetType and MetadataLookup, if such subsequent invocations
occurred after the ApplicationContext had been refreshed.

The reason this occurs is due to the following.

- Class#getDeclaredMethods() always returns "child copies" of the
  underlying Method instances -- which means that `equals()` should be
  used instead of `==` whenever the compared Method instances can come
  from different sources (such as the static caches mentioned below).

- BridgeMethodResolver caches resolved bridge methods in a static cache
  -- which is never cleared.

- ReflectionUtils caches declared methods in a static cache
  -- which gets cleared when an ApplicationContext is refreshed.

Consequently, if you attempt to load an ApplicationContext twice in the
same ClassLoader, the second attempt uses the existing, populated cache
for bridged methods but a cleared, empty cache for declared methods.
This results in new invocations of Class#getDeclaredMethods(), and
identity checks with `==` then fail to detect equivalent bridge methods.

This commit addresses this by additionally comparing bridge methods
using `equals()` in MethodIntrospector.selectMethods().

Note that the `==` checks remain in place as an optimization for when
`equals()` is unnecessary.

Closes gh-32586

(cherry picked from commit e702733c7b)
2024-04-09 19:05:53 +02:00
Juergen Hoeller
ba776d7201 Log column type for limited support message in getResultSetValue
Closes gh-32601

(cherry picked from commit c5590ae9e6)
2024-04-09 16:20:51 +02:00
Juergen Hoeller
aba5f421fc Remove accidental backport of 6.1 class 2024-04-08 23:51:13 +02:00
Juergen Hoeller
2bac1629e6 Upgrade to Groovy 4.0.20, Netty 4.1.108, OpenPDF 1.3.43 2024-04-08 23:26:19 +02:00
Juergen Hoeller
9412d782ce Revised tests for generic FactoryBean type matching (backported)
See gh-32489
2024-04-08 23:00:33 +02:00
Juergen Hoeller
a0bd13ceb1 Do not extract FactoryBean generic in case of targetType mismatch
Closes gh-32489
2024-04-08 10:16:48 +02:00
Stéphane Nicoll
46a0821205 Stop linking to Websphere's Javadoc
Closes gh-32582
2024-04-05 15:58:42 +02:00
Stéphane Nicoll
2c531344c6 Upgrade to Gradle 8.7
Closes gh-32567
2024-04-02 18:02:34 +02:00
Stéphane Nicoll
6610ee360e Upgrade actions that use deprecated features 2024-03-20 10:35:46 +01:00
Minsung Oh
afde96c540 Fix link to vavr in the reference guide
Closes gh-32495
2024-03-20 10:03:29 +01:00
Sam Brannen
da799bc519 Wrap InvalidMimeTypeException in HttpMediaTypeNotAcceptableException
The fix for #31254 resulted in an InvalidMimeTypeException being thrown
by MimeTypeUtils.sortBySpecificity() instead of an
IllegalArgumentException. However, InvalidMimeTypeException extends
IllegalArgumentException. Consequently, the change from
IllegalArgumentException to InvalidMimeTypeException did not result in
the desired effect in HeaderContentNegotiationStrategy.

HeaderContentNegotiationStrategy.resolveMediaTypes() still allows the
InvalidMimeTypeException to propagate as-is without wrapping it in an
HttpMediaTypeNotAcceptableException.

To address this issue, this commit catches InvalidMediaTypeException
and InvalidMimeTypeException in HeaderContentNegotiationStrategy and
wraps the exception in an HttpMediaTypeNotAcceptableException.

See gh-31254
See gh-31769
Closes gh-32483

(cherry picked from commit ef02f0bad8)
2024-03-19 15:55:15 +01:00
Sam Brannen
755968fd2c Polishing
(cherry picked from commit 836a0b3a40)
2024-03-19 15:55:08 +01:00
Juergen Hoeller
eea00628f9 Polishing 2024-03-18 16:22:03 +01:00
Juergen Hoeller
8d745462b4 Propagate JMS IllegalStateException from commit/rollbackIfNecessary
Closes gh-32473

(cherry picked from commit cd7ba1835c)
2024-03-18 16:13:55 +01:00
Sam Brannen
ed6c25fb6e Avoid unnecessary Annotation array cloning in TypeDescriptor
Closes gh-32476

(cherry picked from commit 42a4f28962)
2024-03-18 15:18:43 +01:00
Juergen Hoeller
8460a2d285 Restore original toString representation (revert accidental backport)
See gh-32405
2024-03-17 20:43:07 +01:00
Juergen Hoeller
c3d186b4d0 Remove superfluous @NonNull declarations 2024-03-16 14:23:12 +01:00