Commit Graph

1865 Commits

Author SHA1 Message Date
Juergen Hoeller
4ecbf6511d Remove dead fallback code 2021-10-13 12:52:38 +02:00
Juergen Hoeller
5b6a32d1b9 Polishing 2021-10-12 16:18:41 +02:00
Juergen Hoeller
3a166ea742 Add efficient existence check to ClassPathResource.isReadable()
Includes reduced isReadable() check in PathResourceLookupFunction, aligned with PathResourceResolver.

Closes gh-27538
See gh-21372
2021-10-12 16:18:09 +02:00
Rossen Stoyanchev
82f8d0dfd7 Apply value formatting to resolved exceptions 2021-10-11 11:15:59 +01:00
Rossen Stoyanchev
2b55b9ccd5 Do not log request parameters for multipart requests
Closes gh-27350
2021-09-14 13:41:15 +01:00
Juergen Hoeller
e31d66cd2b Polishing (backported from 5.3.x) 2021-09-02 23:18:36 +02:00
Juergen Hoeller
4b3e8619ec Polishing 2021-09-02 22:53:30 +02:00
Juergen Hoeller
67fccc3c7e Nullability refinements and related polishing (backported) 2021-06-08 14:58:58 +02:00
Juergen Hoeller
a2ff769bc1 Polishing (backported from master) 2021-05-11 17:32:23 +02:00
ShindongLee
3ab270e0f1 Fix parameter bug of handler inside the filterFunction DSL
Co-authored-by: hojongs <hojong.jjh@gmail.com>
Co-authored-by: bjh970913 <bjh970913@gmail.com>

Closes gh-26921
2021-05-10 10:22:13 +02:00
Juergen Hoeller
19474e2d03 Nullability refinements
(cherry picked from commit f31933e67e)
2021-04-13 12:32:16 +02:00
Juergen Hoeller
43071109f7 Polishing (backported from master) 2021-04-13 11:48:55 +02:00
Juergen Hoeller
bb530dca5b Polishing (backported from master) 2021-04-12 23:39:24 +02:00
Juergen Hoeller
c978fb4466 Documentation fixes etc (backported from master) 2021-03-09 16:57:04 +01:00
Juergen Hoeller
0fc831e8bd Polishing (backported from master) 2021-03-09 00:05:55 +01:00
Sam Brannen
31c5fc6417 Polish contribution
See gh-26619
2021-03-02 14:28:01 +01:00
GungnirLaevatain
e8f685ecc8 Ensure local @CrossOrigin maxAge overrides global value
Prior to this commit, a method-level @CrossOrigin maxAge value did not
override a class-level @CrossOrigin maxAge value. This contradicts the
Javadoc for @CrossOrgin which states the following.

    For those attributes where only a single value can be accepted such
    as allowCredentials and maxAge, the local overrides the global
    value.

This commit ensures that a method-level @CrossOrigin maxAge value
overrides a class-level @CrossOrigin maxAge value.

Closes gh-26619
2021-03-02 14:27:49 +01:00
Brian Clozel
9f7c8aea94 Fix ResourceUrlProvider handler auto-detection
Prior to this commit, `ResourceUrlProvider` would listen and consider
all `ContextRefreshedEvent` and use the given context to detect
`SimpleUrlHandlerMapping`.

This could lead to situations where a `ResourceUrlProvider` uses another
application context than its own (in a parent/child context setup) and
detect the wrong set of handlers.

Because `ResourceUrlProvider` locks itself once the auto-detection is
done, we need to ensure that it considers only events sent by its
application context.

Fixes gh-26562
2021-02-17 22:10:29 +01:00
Rossen Stoyanchev
8a150ee3a4 Fix order of headers in DefaultHandlerExceptionResolver
Closes gh-26470
2021-01-29 20:49:19 +00:00
Sam Brannen
059cff52b7 Remove obsolete commandName attribute in spring-form.tld
Since support for the commandName attribute was removed from the
implementation of FormTag in Spring Framework 5.0, the presence of the
commandName attribute in the spring-form.tld file is no longer valid
and can lead one to assume that the commandName attribute is still
supported -- for example when using code completion in a JSP editor.

This commit therefore removes the obsolete commandName attribute in
spring-form.tld.

Closes gh-26337
2021-01-03 17:50:15 +01:00
Rossen Stoyanchev
37bda566eb Allow "*" for Access-Control-Expose-Headers
Closes gh-26113
2020-11-19 09:48:41 +00:00
Juergen Hoeller
cde95e1446 Polishing 2020-11-09 13:52:34 +01:00
Juergen Hoeller
7881329cf7 Polishing 2020-11-05 18:18:38 +01:00
Rossen Stoyanchev
bb4e802af5 Full header support HTTP HEAD Resource requests
Allow the body to be written in order for all headers to be set
as they would be on HTTP GET. The body content is ignored as a
lower level.

See gh-25976
2020-10-27 11:14:37 +00:00
Rossen Stoyanchev
d91b66a04c Allow Resource to add headers for range requests
Closes gh-25976
2020-10-27 10:15:56 +00:00
Sam Brannen
449377908f Fix JUnit 4 to AssertJ migration bugs
The migration from JUnit 4 assertions to AssertJ assertions resulted in
several unnecessary casts from int to long that actually cause
assertions to pass when they should otherwise fail.

This commit fixes all such bugs for the pattern `.isNotEqualTo((long)`.
2020-10-26 14:53:09 +01:00
Brian Clozel
7bee3d1574 Optimize Jackson resource management in codecs
Prior to this commit, references to `JsonGenerator` and
`ByteArrayBuilder` were not closed/released within codecs calls.
This prevents Jackson from reusing more efficiently shared memory
resources.

This commit properly closes/releases Jackson resources in Spring MVC,
Spring WebFlux and Spring Messaging codecs.
A benchmark on WebFlux codecs (in both single value/streaming mode)
shows significant throughput and allocation improvements for small
payloads.

Closes gh-25910
2020-10-20 15:36:23 +02:00
Rossen Stoyanchev
db3d537e72 Protect SseEmitter against early I/O errors
Closes gh-25442
2020-10-16 19:08:30 +01:00
Rossen Stoyanchev
a0727191e1 Polishing 2020-10-16 19:08:13 +01:00
Juergen Hoeller
72b2dda17f Avoid creation of unused logger instance in AbstractMediaTypeExpression
Closes gh-25901
2020-10-13 00:20:06 +02:00
Rossen Stoyanchev
eb11c6fa23 Reinstate removal of jsessionid from lookup path
Closes gh-25864
2020-10-07 11:31:52 +01:00
Juergen Hoeller
6e4fcb69f0 Polishing 2020-09-25 11:26:01 +02:00
Juergen Hoeller
d9da663f6d Optimize String argument resolution in MessageTag
Closes gh-25809
2020-09-25 11:23:38 +02:00
Juergen Hoeller
82e64af5a5 Avoid throwing plain RuntimeException (plus related polishing)
See gh-24805
2020-09-18 19:01:49 +02:00
Rossen Stoyanchev
16d125ce76 Extend Content-Disposition "inline" to error responses
We don't expect a browser to save error responses to a file but we
extend this protection anyway since "inline" is only a suggestion
that shouldn't have any side effects.
2020-09-14 15:28:53 +01:00
Rossen Stoyanchev
852718ec0e Minor fix in PathResourceResolverTests
Closes gh-25671
2020-09-13 21:09:08 +01:00
Rossen Stoyanchev
f88759c3c9 Shared read-only instances of UrlPathHelper
UrlPathHelper is often created and used without customizations or with
the same customizations. This commit introduces re-usable, instances.
Effectively a backport of commit 23233c.

See gh-25690
2020-09-07 21:27:52 +01:00
Juergen Hoeller
6f0461c569 Polishing 2020-08-25 16:17:22 +02:00
Juergen Hoeller
04df9b8f49 Efficient checks for empty strings and single character matches
Closes gh-25552
Closes gh-25553
2020-08-25 16:17:12 +02:00
Juergen Hoeller
3b9558a269 Polishing 2020-08-07 15:51:33 +02:00
Juergen Hoeller
8dd285f877 Polishing 2020-08-07 13:02:43 +02:00
Sam Brannen
335c3d5db6 Polish contribution
See gh-25445
2020-07-22 17:26:59 +02:00
XenoAmess
ab859fcc96 Refine use of substring operations
Closes gh-25445
2020-07-22 17:26:42 +02:00
Juergen Hoeller
0b697a3068 Polishing 2020-07-17 19:24:23 +02:00
Juergen Hoeller
e9898f7d52 Polishing 2020-07-17 17:48:33 +02:00
Juergen Hoeller
e46ccd74b1 Consistent abstract declaration of "Abstract" base classes
Closes gh-25240
2020-06-11 23:43:41 +02:00
Rossen Stoyanchev
a2d516d526 Replace "whitelist" with alternative words 2020-06-08 21:19:28 +01:00
Rossen Stoyanchev
8dc8d88f88 Pre-calculated RequestMappingInfo hashcode
See gh-25143
2020-06-03 06:11:35 +01:00
Rossen Stoyanchev
1e25556049 Shared PathPatternParser instance
See gh-25143
2020-06-03 05:58:10 +01:00
Rossen Stoyanchev
a92f425529 Also use constant for custom mapping condition
See gh-25143
2020-05-28 06:51:57 +01:00