Commit Graph

2126 Commits

Author SHA1 Message Date
Sam Brannen
a2ef6badc4 Use StringBuilder.append(char) where possible
To slightly improve performance, this commit switches to
StringBuilder.append(char) instead of StringBuilder.append(String)
whenever we append a single character to a StringBuilder.

Closes gh-27098
2021-06-25 10:44:28 +02:00
Sam Brannen
4e8828dc10 Suppress warnings in ServletAnnotationControllerHandlerMethodTests 2021-06-21 18:55:52 +02:00
Sam Brannen
df588e030f Avoid duplicated documentation of validation annotations
See gh-27042, gh-27043, gh-27050
2021-06-15 17:30:41 +02:00
Sam Brannen
b677206159 Polish Javadoc 2021-06-15 17:22:11 +02:00
Sviatoslav Hryb
e04ca3d671 Improve RequestPartMethodArgumentResolver Javadoc
Closes gh-27043
2021-06-15 17:06:53 +02:00
Sviatoslav Hryb
2fc47d8752 Improve RequestResponseBodyMethodProcessor Javadoc
Closes gh-27042
2021-06-15 17:04:18 +02:00
Juergen Hoeller
23f396a231 Nullability refinements 2021-06-08 14:23:06 +02:00
Sviatoslav Hryb
708e61a7ef Fix WebMvcConfigurationSupport javadoc 2021-06-08 12:50:22 +02:00
Sam Brannen
f0f450a18d Polishing 2021-06-07 13:24:46 +02:00
Sam Brannen
746b1b2fe1 Polishing 2021-05-23 18:27:31 +02:00
izeye
ab2c78a9d5 Fix broken Javadoc tags
Closes gh-26967
2021-05-23 18:09:34 +02:00
Brian Clozel
ac0e71745b Set best matching pattern attribute in WebMvc.fn
Prior to this commit, the `RouterFunctionMapping` WebFlux.fn variant
would set the `HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE` as an
exchange attribute. This is useful for instrumentation purposes.
The WebMvc.fn variant would not do the same; this would lead to
"UNKNOWN" path metrics tags.

This commit ensures that the `RouterFunctionMapping` WebMvc.fn variant
does set the `BEST_MATCHING_PATTERN_ATTRIBUTE` and
`BEST_MATCHING_HANDLER_ATTRIBUTE` request attributes.

Closes gh-26963
2021-05-21 11:54:06 +02:00
Juergen Hoeller
1469bdbc70 Nullability refinements and related polishing 2021-05-11 16:50:19 +02:00
Rossen Stoyanchev
aa51ed1940 Fix failing tests
This commit ensures that if an Origin is returned as it was provided,
possibly with a trailing slash.

See gh-26892
2021-05-10 14:15:16 +01:00
ShindongLee
07ba95739b 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-26838
2021-05-10 09:35:56 +02:00
Rossen Stoyanchev
443c34cc90 CorsRegistry implements combine correctly
Closes gh-26877
2021-05-05 21:02:25 +01:00
Bryce Yang
55faf6e320 Use HttpMethod enums
See gh-26855
2021-05-04 12:09:35 +01:00
Arjen Poutsma
6f4fb08bf8 Invoke WebMvc.fn error handlers for async errors
This commit makes sure that any error handlers registered on the route
are also applied when an error occurs asynchronously. This commit
applies to asynchronous bodies with both CompletableFuture and Reactive
Streams, as well as completely asynchronous responses.

Closes gh-26831
2021-04-30 11:43:40 +02:00
Johnny Lim
98770b15e7 Polishing
Closes gh-26878
2021-04-29 16:53:53 +02:00
Rossen Stoyanchev
86123de883 HandlerMappingIntrospector handles attribute changes properly
Closes gh-26833
2021-04-26 17:16:33 +01:00
Christoph Dreis
e7cbe23771 Avoid exceptions when evaluating validation hints
Prior to this commit, evaluating validation hints for
@javax.validation.Valid caused exceptions being raised when getting the
value of this annotation, which does not exist. Bypassing
AnnotationUtils.getValue() in those cases can improve performance by
avoiding the cost incurred by raising exceptions.

See gh-26787
2021-04-22 11:19:30 +02:00
Rossen Stoyanchev
69bbdce826 HandlerMappingIntrospector ensures initialized RequestPath
Closes gh-26814
2021-04-16 19:56:03 +01:00
Rossen Stoyanchev
27c4e74e24 Update CORS Javadoc in spring-websocket
Closes gh-26753
2021-04-13 17:43:40 +01:00
Juergen Hoeller
f31933e67e Nullability refinements 2021-04-13 12:26:52 +02:00
Sam Brannen
f03ccd5cc9 Fix Javadoc in AcceptHeaderLocaleResolver
Closes gh-26793
2021-04-13 11:36:28 +02:00
Juergen Hoeller
04ce8e0ac4 Make URL path tests compatible with Windows
See gh-26775
2021-04-13 09:52:23 +02:00
Juergen Hoeller
29955a2898 Polishing 2021-04-12 22:41:00 +02:00
Rossen Stoyanchev
0a6a6d48e2 Avoid CI failures with UTF-8 chars in test filenames
See gh-26775
2021-04-12 20:14:48 +01:00
Rossen Stoyanchev
a08593b44b Correct matching of static resources with parsed patterns
Closes gh-26775
2021-04-12 19:54:20 +01:00
Arjen Poutsma
a2d91a562d Support "Accept-Patch" for unsupported media type
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header, which is sent when the client sends unsupported
data in PATCH requests.
See  section 2.2 of RFC 5789.

Closes gh-26759
2021-04-08 14:46:59 +02:00
Arjen Poutsma
97f3846971 Support "Accept-Patch" for OPTIONS requests
This commit introduces support in both servlet and webflux for the
"Accept-Patch" header in OPTIONS requests, as defined in section 3.1 of
RFC 5789.

See gh-26759
2021-04-08 14:43:49 +02:00
Stephane Nicoll
7adac25e7e Update copyright year of changed file
See gh-26776
2021-04-08 14:24:18 +02:00
Hyeonmin Park
7dca6a36a6 Fix javadoc link syntax
See gh-26776
2021-04-08 14:21:11 +02:00
Rossen Stoyanchev
b651c10e83 Fix error messages to match commit #1a9556
See gh-26679
2021-03-29 18:30:49 +01:00
Rossen Stoyanchev
5651695fd1 Fix typo in Javadoc
Closes gh-26740
2021-03-29 17:59:19 +01:00
Rossen Stoyanchev
1a9556925d missingAfterConversion flag for missing request values
Closes gh-26679
2021-03-29 15:23:29 +01:00
Rossen Stoyanchev
a931ff12f6 MappedInterceptor falls back on PathMatcher
Closes gh-26690
2021-03-22 07:12:10 +00:00
Juergen Hoeller
530fb0808d Polishing 2021-03-08 23:45:56 +01:00
Taemin Shin
b9a612b637 Add RouterFunctionMapping to Javadoc for WebMvcConfigurationSupport
Closes gh-26635
2021-03-03 14:44:40 +01:00
Sam Brannen
7efb4eade6 Delete unnecessary @SuppressWarnings declaration 2021-03-02 14:10:40 +01:00
Sam Brannen
e89cc9934f Delete unused method 2021-03-02 14:00:36 +01:00
Sam Brannen
010b7375fc Fix typo in Javadoc 2021-03-02 14:00:21 +01:00
Sam Brannen
01c2e12fef Polish contribution
See gh-26619
2021-03-02 13:54:01 +01:00
GungnirLaevatain
90de1ab6d1 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 13:21:35 +01:00
Rossen Stoyanchev
8c9c59eba0 Fix typo
See gh-24539
2021-02-25 18:33:35 +00:00
Rossen Stoyanchev
e04269cadd Consistently check DispatcherType to avoid NPE in tests
Closes gh-26602
2021-02-25 18:20:34 +00:00
Rossen Stoyanchev
aa73f6733e Lenient treatment of malformed Accept header for @ExceptionHandler
Closes gh-24539
2021-02-25 17:58:32 +00:00
Rossen Stoyanchev
3ec0452fed Dedicated, "_"-prefixed log category for request mappings
Closes gh-26539
2021-02-24 09:36:43 +00:00
Brian Clozel
947387b4cd 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-26561
2021-02-17 22:04:39 +01:00
Rossen Stoyanchev
729535d36c Ensure presence of cached lookupPath
Closes gh-26546
2021-02-15 12:24:07 +00:00