Commit Graph

24005 Commits

Author SHA1 Message Date
Sébastien Deleuze
cfec88bfa8 Add CORS support for Private Network Access
This commit adds CORS support for Private Network Access
by adding an Access-Control-Allow-Private-Network response
header when the preflight request is sent with an
Access-Control-Request-Private-Network header and that
Private Network Access has been enabled in the CORS
configuration.

See https://developer.chrome.com/blog/private-network-access-preflight/
for more details.

Closes gh-31974

(cherry picked from commit 318d460256)
2024-01-08 11:49:00 +01:00
Juergen Hoeller
dd9b6749d7 Avoid getMostSpecificMethod resolution for non-annotated methods
This is aligned with AutowiredAnnotationBeanPostProcessor now.

Closes gh-31967

(cherry picked from commit 9912a52bb8)
2024-01-07 16:46:50 +01:00
Juergen Hoeller
2b9cea618f Propagate arguments for dynamic prototype-scoped advice
Closes gh-28407

(cherry picked from commit 43107e7eb1)
2024-01-07 00:26:29 +01:00
Juergen Hoeller
e16dd5f3e2 Refine exception handling for type not present versus access exception
Includes TypeVariable bypass for reflection-free annotation retrieval.
Includes info log message for annotation attribute retrieval failure.

Closes gh-27182

(cherry picked from commit 70247c4a94)
2024-01-06 23:20:39 +01:00
Juergen Hoeller
c1db06af88 Default time zone resolution from scheduler-wide Clock
Closes gh-31948
2024-01-05 10:30:54 +01:00
Juergen Hoeller
b2bdc7de30 Polishing 2023-12-30 15:51:05 +01:00
Sam Brannen
8f2bb4973d Scan annotations on method in interface hierarchy only once
Prior to this commit, the AnnotationsScanner used in the
MergedAnnotations infrastructure found duplicate annotations on methods
within multi-level interface hierarchies.

This commit addresses this issue by scanning methods at a given level
in the interface hierarchy using ReflectionUtils#getDeclaredMethods
instead of Class#getMethods, since the latter includes public methods
declared in super-interfaces which will anyway be scanned when
processing super-interfaces recursively.

Closes gh-31803

(cherry picked from commit 75da9c3c47)
(cherry picked from commit 1e742aae34)
2023-12-13 10:24:15 +01:00
Sam Brannen
a45154c875 Polish MergedAnnotation tests
(cherry picked from commit 952223dcf9)
(cherry picked from commit 20dd585c93)
2023-12-13 10:24:15 +01:00
Juergen Hoeller
d54e101f00 PathEditor considers single-letter URI scheme as NIO path candidate
Closes gh-29881

(cherry picked from commit c56c304536)
2023-11-30 14:25:16 +01:00
Sam Brannen
9ef2b5d908 Include scroll() in SharedEntityManagerCreator's queryTerminatingMethods
This commit supports the scroll() and scroll(ScrollMode) methods from
Hibernate's Query API in SharedEntityManagerCreator's query-terminating
methods set.

See gh-31682
Closes gh-31684
2023-11-26 12:22:56 +01:00
Juergen Hoeller
0ecbeef01d Consider generics in equals method (for ConversionService caching)
Closes gh-31672

(cherry picked from commit 710373d286)
2023-11-24 23:40:04 +01:00
Juergen Hoeller
5105fdf8c0 Filter candidate methods by name first (for more efficient sorting)
Closes gh-28377

(cherry picked from commit 0599320bd8)
2023-11-24 23:33:32 +01:00
Brian Clozel
687676ea47 Fix ordering of releasing resources in JSON Encoder
Prior to this commit, the Jackson 2.x encoders, in case of encoding a
stream of data, would first release the `ByteArrayBuilder` and then the
`JsonGenerator`. This order is inconsistent with the single value
variant (see `o.s.h.codec.json.AbstractJackson2Encoder#encodeValue`) and
invalid since the `JsonGenerator` uses internally the
`ByteArrayBuilder`.

In case of a CSV Encoder, the codec can buffer data to write the column
names of the CSV file. Writing an empty Flux with this Encoder would not
fail but still log a NullPointerException ignored by the reactive
pipeline.

This commit fixes the order and avoid such issues at runtime.

Fixes gh-31657
2023-11-22 21:35:16 +01:00
Juergen Hoeller
b17714bb7b Polishing 2023-11-22 13:14:10 +01:00
rstoyanchev
61ac912f67 WebSocketMessageBrokerStats implements SmartInitializingSingleton
Closes gh-26536
2023-11-21 18:00:02 +00:00
Spring Builds
1077d5c5ea Next development version (v5.3.32-SNAPSHOT) 2023-11-16 08:11:41 +00:00
Juergen Hoeller
b28a5f858c Upgrade to Reactor 2020.0.38 and Netty 4.1.101
Includes RxJava 3.1.8, SmallRye Mutiny 1.9.0, BlockHound 1.0.8, OpenPDF 1.3.33, Checkstyle 10.12.5

Closes gh-31584
2023-11-15 14:25:03 +01:00
Juergen Hoeller
e660859ec3 Consistent ordering of overloaded operations
(cherry picked from commit c373f496f3)
2023-11-15 14:15:47 +01:00
Stéphane Nicoll
a6ab308cf4 Fix wrong nullability requirement
Closes gh-31611
2023-11-15 12:08:19 +01:00
Sam Brannen
c489234cc2 Polish contribution
See gh-31598
See gh-31603

(cherry picked from commit e71117dcdf)
2023-11-14 15:31:32 +01:00
Jason
af593588d3 Avoid duplicate resources in PathMatchingResourcePatternResolver on Windows
This commit updates PathMatchingResourcePatternResolver to avoid
returning duplicate resources on MS Windows when searching using the
`classpath*:` prefix and a wildcard pattern that matches resources
which are directly present in a JAR as well as present via classpath
manifest entries.

See gh-31598
Closes gh-31603

(cherry picked from commit d5874ab99e)
2023-11-14 15:31:11 +01:00
Juergen Hoeller
75193b2e84 Upgrade to Log4J 2.21.1, Tomcat 9.0.82, Jetty 9.4.53, Undertow 2.2.28, Netty 4.1.100, Reactor 2020.0.37 2023-11-09 12:32:42 +01:00
Juergen Hoeller
f97e819c9e Log4jLog re-resolves ExtendedLogger on deserialization
This is necessary for compatibility with Log4J 2.21, analogous to the existing re-resolution in Spring's SLF4J adapter.

Closes gh-31582

(cherry picked from commit 1e78cc35e5)
2023-11-09 12:12:55 +01:00
Juergen Hoeller
f8e1ce3074 Check for procedure vs function constants in CallMetaDataContext
Closes gh-31550

(cherry picked from commit 9957bb6918)
2023-11-09 12:06:59 +01:00
Arjen Poutsma
d3ec9395e1 Guard for empty FileItems in CommonsFileUploadSupport
This commit ensures that a FileItem is not empty before its value is
read.

Closes gh-31564
2023-11-08 15:35:17 +01:00
Juergen Hoeller
de0cb53394 Polishing
(cherry picked from commit 925fa0272b)
2023-10-24 23:32:17 +02:00
Juergen Hoeller
1bf5d8b9e5 Avoid ResolvableType for simple assignability check in copyProperties
Closes gh-27246

(cherry picked from commit 09aa59f9e7)
2023-10-24 23:22:31 +02:00
Stéphane Nicoll
15a306d8dd Resolve to empty MultiValueMap when no matrix variables are provided
Closes gh-31484
2023-10-24 11:02:45 +02:00
Juergen Hoeller
680939557c Test for @Resource @Lazy fallback type match
See gh-31447
2023-10-23 17:49:04 +02:00
Juergen Hoeller
84f3ce1f91 Test for getObjectType on uninitialized ProxyFactoryBean
See gh-31473
2023-10-23 17:48:56 +02:00
Juergen Hoeller
2dc4fe0857 BeanCopier sets name prefix for public classes as well
Includes consistent formatting of Spring-patched files.

Closes gh-28699

(cherry picked from commit 7a60e2024b)
2023-10-15 16:25:40 +02:00
Juergen Hoeller
cb28e2a701 Polishing 2023-10-11 16:01:12 +02:00
Juergen Hoeller
0370aa6007 Do not close transactional Connection in doReleaseConnection
Closes gh-28133
2023-10-11 15:51:58 +02:00
Juergen Hoeller
704650de6d Properly return SQLExceptionTranslator-provided exception
Closes gh-31409
2023-10-11 13:20:13 +02:00
Arjen Poutsma
8538a73f20 Updated Java 8 version in sdkmanrc 2023-10-11 10:38:59 +02:00
Juergen Hoeller
c615a6667d Revise javadoc for LifecycleProcessor bean etc 2023-10-10 23:28:57 +02:00
Juergen Hoeller
45cfe70d30 Revise transaction annotation recommendations
Closes gh-23538
2023-10-10 23:11:59 +02:00
Juergen Hoeller
288e255ce9 Throw IllegalArgumentException for null SQL String
Closes gh-31391

(cherry picked from commit 8b5d993e61)
2023-10-10 23:07:46 +02:00
Stéphane Nicoll
12159b98a2 Provide best-effort toString for Lazy resolved message
Previously, MessagingMessageListenerAdapter or any adapter relying on
the default MessagingMessageConverter would log an incoming message
with a toString of the Message that does not provide any extra
information. This is due to the default implementation providing a
lazy resolution message that only attempts to extract the payload
when necessary.

This commit implements a toString method that uses the raw JMS message
if the payload is not available. If it is, the payload is used instead.

Closes gh-21265

(cherry picked from commit a37abd5e54)
2023-10-10 23:07:40 +02:00
Sam Brannen
7a8ec2a761 Polish BeanPropertyRowMapper Javadoc 2023-10-02 17:28:15 +02:00
Stéphane Nicoll
ca4674df42 Fix description of default behavior in BeanPropertyRowMapper
Closes gh-31349
2023-10-02 15:08:47 +02:00
Juergen Hoeller
2ec32a4e2f Polishing 2023-09-29 15:39:11 +02:00
Juergen Hoeller
3849ed3a0c Explicit note on local bean access within @PostConstruct method
Closes gh-27876
2023-09-29 15:38:55 +02:00
Sam Brannen
d62f17864c Test status quo for zero capacity behavior in ConcurrentLruCache
See gh-31317
2023-09-27 12:57:08 +02:00
Stéphane Nicoll
3c59c2a275 Fix note on CGLIB supported method visibility
CGLIB do support package-private and protected methods now so the
note in the reference doc should be changed accordingly.

Closes gh-31311
2023-09-25 15:26:42 +02:00
Juergen Hoeller
2b4c1e265c Reset findLoadedClassMethod in case of makeAccessible failing
Closes gh-31232
2023-09-14 16:46:17 +02:00
Spring Builds
cc0cbc15aa Next development version (v5.3.31-SNAPSHOT) 2023-09-14 07:54:54 +00:00
Juergen Hoeller
f7bf2431fb Clarify IN clause resolution with List/Iterable parameter
Closes gh-31228
2023-09-14 09:28:54 +02:00
Sébastien Deleuze
40678bb981 Refine CORS documentation for wildcard processing
This commit adds a reference documentation section dedicated
to CORS credentialed requests and related wildcard processing.

Closes gh-31168
2023-09-11 18:22:03 +02:00
Sébastien Deleuze
75faf698af Refine CORS documentation for wildcard processing
This commit refines CORS wildcard processing Javadoc to
provides more details on how wildcards are handled for
Access-Control-Allow-Methods, Access-Control-Allow-Headers
and Access-Control-Expose-Headers CORS headers.

For Access-Control-Expose-Headers, it is not possible to copy
the response headers which are not available at the point
when the CorsProcessor is invoked. Since all the major browsers
seem to support wildcard including on requests with credentials,
and since this is ultimately the user-agent responsibility to
check on client-side what is authorized or not, Spring Framework
continues to support this use case.

See gh-31168
2023-09-11 18:15:07 +02:00