Sam Brannen
b659030867
Merge branch '5.3.x'
2022-05-31 12:01:39 +02:00
Sam Brannen
8547f8601d
Polish LocaleResolver tests
2022-05-31 11:55:30 +02:00
rstoyanchev
5e979af95a
Merge branch '5.3.x'
2022-05-23 11:24:58 +01:00
rstoyanchev
f95bf96ec9
Correct path encoding/decoding in PathResourceResolver
...
Decoding is required for non-UrlResource when the HandlerMapping is
not expected to decode the path. Encoding is the opposite.
This commit ensures correct determination of whether the HandlerMapping
is expected to have decoded the path or not that in turn depends on
whether PathPattern or PathMatcher is in use.
Closes gh-27791
2022-05-23 11:03:42 +01:00
rstoyanchev
66a5742df3
Polishing
2022-05-23 10:07:03 +01:00
Sam Brannen
874077d16e
Apply "advanced" instanceof pattern matching
2022-05-17 11:24:32 +02:00
Sam Brannen
0cf2bd0bcf
Suppress warning in test in Gradle build
2022-05-14 17:10:54 +02:00
rstoyanchev
f0e23b66f3
The "consumes" condition compares MediaType parameters
...
Closes gh-9257
2022-05-11 17:52:04 +01:00
Andy Wilkinson
1d825440c3
Update Javadoc since type-level @Controller is now required
...
See gh-22154 which removed support for a type-level @RequestMapping
annotation alone being sufficient for handler detection.
Closes gh-28448
2022-05-11 16:46:10 +02:00
Sam Brannen
6325ca95a6
Merge branch '5.3.x'
...
# Conflicts:
# gradle.properties
# spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java
2022-05-11 16:20:09 +02:00
Sam Brannen
06679a5583
Fix tests in DispatcherServletTests
...
See gh-28424
2022-05-11 16:00:26 +02:00
Sam Brannen
745eb1a881
Polish DispatcherServletTests
2022-05-11 15:59:47 +02:00
Sam Brannen
eb50a6f4a0
Further polishing regarding JDK baseline upgrade
...
See gh-28440
2022-05-10 17:01:40 +02:00
lihan
a892ce80c1
Polishing regarding JDK baseline upgrade
...
Closes gh-28440
2022-05-10 17:01:40 +02:00
Sam Brannen
d45b5f6e8a
Merge branch '5.3.x'
...
# Conflicts:
# spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java
# spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java
2022-05-10 11:44:14 +02:00
Sam Brannen
1c10cdd1e8
Update copyright dates
...
See gh-28433
2022-05-10 11:33:32 +02:00
evgeny.bovykin
941b92cbed
Make inner classes static when feasible
...
A static nested class does not keep an implicit reference to its
enclosing instance.
This prevents a common cause of memory leaks and uses less memory per
instance of the class.
Closes gh-28433
2022-05-10 11:32:37 +02:00
Sam Brannen
5f8a4bcdc5
Merge branch '5.3.x'
...
# Conflicts:
# spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java
# spring-context/src/main/java/org/springframework/scripting/support/StandardScriptFactory.java
2022-05-09 20:08:37 +02:00
rstoyanchev
8378af9e39
Polishing
...
See gh-28189
2022-05-09 19:01:10 +01:00
rstoyanchev
78ab4d7118
Support content negotiation for RFC 7807
...
Closes gh-28189
2022-05-09 18:32:21 +01:00
Sam Brannen
e26d8839b3
Stop referring to features as Java 6/7 features where unnecessary
2022-05-09 19:09:06 +02:00
Sam Brannen
9b1c8a3a5c
Fix broken ToStringVisitorTests
...
Tests were broken due to the switch to Set.of(...) in
2b65f274dc
.
2022-05-07 16:45:46 +02:00
Juergen Hoeller
2b65f274dc
Use Set.of instead of HashSet with Arrays.asList
2022-05-06 16:19:27 +02:00
Stephane Nicoll
b4f4fd71c9
Merge branch '5.3.x'
2022-04-24 09:57:16 +02:00
Stephane Nicoll
b81c62d064
Update copyright year of changed file
...
See gh-28372
2022-04-24 09:56:39 +02:00
zhangmingqi09
ca1a11acac
Fix github issue reference in RequestMappingHandlerMapping
...
See gh-28372
2022-04-24 09:55:20 +02:00
Sam Brannen
081c6463e9
Polish Javadoc for PathVariableMapMethodArgumentResolver
2022-04-16 17:57:44 +02:00
dugenkui03
ffffa055f0
Return UnmodifiableMap in MVC PathVariableMapMethodArgumentResolver
...
See gh-28127
Closes gh-28352
2022-04-16 17:57:44 +02:00
Sam Brannen
1574fed90b
Merge branch '5.3.x'
2022-04-13 10:08:31 +02:00
Sam Brannen
a7cf19cec5
Improve documentation and matching algorithm in data binders
2022-04-13 09:55:40 +02:00
Juergen Hoeller
8744952424
Merge branch '5.3.x'
2022-04-13 00:28:22 +02:00
Juergen Hoeller
0cf7f7bd89
Polishing
2022-04-13 00:24:23 +02:00
Arjen Poutsma
9adfa5e8b0
Add HEAD support in MVC/WebFlux Resource handling
...
This commit introduces explicit HEAD support in Spring
MVC's ResourceHttpRequestHandler and WebFlux's ResourceWebHandler,
adding just headers but no body.
Closes gh-28291
2022-04-07 13:51:21 +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
Sam Brannen
7a1421cb0f
Suppress deprecation warnings in tests
2022-03-29 15:04:58 +02:00
Arjen Poutsma
28ac0d3883
Use HttpStatusCode interface
...
This commit contains changes made because of the introduction of
HttpStatusCode. In general, methods that used to return a HttpStatus
now return HttpStatusCode instead, and methods that returned raw status
codes are now deprecated.
See gh-28214
2022-03-23 12:49:38 +01:00
Sam Brannen
9764f0e59b
Merge branch '5.3.x'
...
# Conflicts:
# spring-test/src/test/java/org/springframework/mock/http/server/reactive/MockServerHttpRequestTests.java
# spring-web/src/test/java/org/springframework/http/server/reactive/HeadersAdaptersTests.java
# spring-web/src/test/java/org/springframework/web/client/RestTemplateIntegrationTests.java
# spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java
# spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java
# spring-webmvc/src/test/java/org/springframework/web/servlet/handler/MappedInterceptorTests.java
# spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HandlerMethodAnnotationDetectionTests.java
# spring-websocket/src/test/java/org/springframework/web/socket/AbstractWebSocketIntegrationTests.java
2022-03-16 15:07:53 +01:00
Sam Brannen
c462fe30ed
Use Named arguments in parameterized tests
2022-03-16 14:45:47 +01:00
Sam Brannen
1392b0f557
Merge branch '5.3.x'
2022-03-15 17:13:10 +01:00
Sam Brannen
9fbf5dc945
Use String#lastIndexOf(int) where possible
2022-03-15 17:03:20 +01:00
Sam Brannen
4db2f8ea1b
Remove obsolete Nashorn-based scripting tests
...
Since the Nashorn JavaScript engine was removed in Java 15, these tests
will never be run on a Java 17+ JDK which is required as of Spring
Framework 6.0.
See gh-27919
2022-03-15 16:33:52 +01:00
rstoyanchev
c03def79d4
Fix test failures
...
See gh-27052
2022-02-28 14:17:04 +00:00
rstoyanchev
b045e5baef
Tests for ErrorResponse hierarchy to verify the output
...
See gh-27052
2022-02-28 13:40:05 +00:00
rstoyanchev
679432ece6
DefaultHandlerExceptionResolver supports ErrorResponse
...
DefaultHandlerExceptionResolver now supports ErrorResponse exceptions
and can map them to HTTP status and headers of the response. This
includes not only exceptions from spring-web, but also any other
exception that implements ErrorResponse.
ResponseEntityExceptionHandler is updated along the same lines, now
also handling any ErrorResponseException. It can be used it for
RFC 7807 support for Spring MVC's own exceptions.
See gh-27052
2022-02-28 13:40:05 +00:00
rstoyanchev
76be6373a8
ErrorResponse support in Spring MVC exception hierarchy
...
All Spring MVC exceptions from spring-web, now implement ErrorResponse
and expose HTTP error response information, including an RFC 7807 body.
See gh-27052
2022-02-28 13:40:05 +00:00
rstoyanchev
3efedef161
Add ErrorResponse and ErrorResponseException
...
ErrorResponse represents a complete error response with status, headers,
and an RFC 7807 ProblemDetail body.
ErrorResponseException implements ErrorResponse and is usable on its
own or as a base class. ResponseStatusException extends
ErrorResponseException and now also supports RFC 7807 and so does its
sub-hierarchy.
ErrorResponse can be returned from `@ExceptionHandler` methods and is
mapped to ResponseEntity.
See gh-27052
2022-02-28 13:40:05 +00:00
rstoyanchev
714d451260
Add ProblemDetail and `@ExceptionHandler` support
...
ProblemDetail is a representation of an RFC 7807 "problem", and this
commits adds support for it in Spring MVC and WebFlux as a return value
from `@ExceptionHandler` methods, optionally wrapped with
ResponseEntity for headers.
See gh-27052
2022-02-28 13:40:05 +00:00
Sam Brannen
8c6d59aaaf
Polish contribution
...
See gh-28014
2022-02-19 14:43:26 +01:00
a.yazychyan
c5c926726d
Use enhanced switch expressions where feasible
...
Closes gh-28014
2022-02-19 14:34:05 +01:00
rstoyanchev
4782d4c080
Merge branch '5.3.x' into main
2022-02-14 20:52:09 +00:00
rstoyanchev
ec03e8830e
Remove path variables from pathWithinMapping
...
Closes gh-27913
2022-02-14 20:51:02 +00:00
rstoyanchev
7ecfce2386
Polishing contribution
...
See gh-27948
2022-02-14 11:26:40 +00:00
heowc
ad2722b3a3
MissingServletRequestPartException extends ServletRequestBindingException
...
Closes gh-27948
2022-02-14 11:26:40 +00:00
Stephane Nicoll
7a2c9b80c2
Merge branch '5.3.x'
2022-02-10 13:15:39 +01:00
Stephane Nicoll
d2c7dfb79e
Add convenience factory method for Managed[List|Set|Map]
...
Closes gh-28026
2022-02-10 12:37:19 +01:00
Sam Brannen
b3f786728e
Use modern language features in tests
2022-02-03 15:35:32 +01:00
Sam Brannen
54565e95b5
Merge branch '5.3.x'
2022-02-03 14:58:36 +01:00
Sam Brannen
f8a5a8d7be
Use modern language features in tests
2022-02-03 14:50:10 +01:00
Juergen Hoeller
50faa29329
Merge branch '5.3.x'
...
# Conflicts:
# build.gradle
2022-01-12 16:38:19 +01:00
Juergen Hoeller
cf5b86369d
Explicitly close InputStream after resolution in RequestPartMethodArgumentResolver
...
Closes gh-27773
2022-01-12 16:31:39 +01:00
Sam Brannen
d57bc176f2
Merge branch '5.3.x'
2022-01-10 14:21:25 +01:00
Sam Brannen
df263d01b9
Use idiomatic AssertJ assertions for true, false, and null
2022-01-10 14:15:55 +01:00
Sam Brannen
61c3d7a989
Merge branch '5.3.x'
2022-01-04 14:09:02 +01:00
Sam Brannen
03668f9c10
Replace remaining use of StringBuffer with StringBuilder
...
Although this commit only applies to test classes, it serves to reduce
the noise when searching for undesirable usage of StringBuffer in
production code.
2022-01-04 14:06:13 +01:00
Sam Brannen
3e14cdbc69
Polish tests
2022-01-04 14:02:32 +01:00
izeye
713795cc34
Polish
...
See gh-27827
2021-12-21 09:36:08 +01:00
Rossen Stoyanchev
3600644ed1
Require type-level @Controller annotation
...
Closes gh-22154
2021-12-14 07:09:08 +00:00
Stephane Nicoll
61601de250
Polish formatting
...
See gh-27801
2021-12-13 15:57:58 +01:00
Adam Ostrožlík
4453102e85
Polish ExceptionHandlerMethodResolver mapping
...
See gh-27801
2021-12-13 15:57:45 +01:00
Rossen Stoyanchev
a15393836c
Merge branch '5.3.x' into main
2021-12-09 15:35:21 +00:00
Rossen Stoyanchev
e9083d7d20
Apply LogFormatUtils in more places
2021-12-09 14:53:52 +00:00
Arjen Poutsma
ce253041c5
Merge branch '5.3.x'
2021-12-07 13:57:40 +01:00
Katada, Junya
9261766677
Fix for ModelAndView.status not working with RedirectView
2021-12-07 13:39:57 +01:00
Juergen Hoeller
14f24f43d7
Polishing
2021-12-03 22:36:31 +01:00
ydh6226
a0ba808217
Use HttpHeaders.ALLOW instead of String constant
...
This commit changes "Allow" strings into HttpHeaders.ALLOW.
See gh-27356
2021-12-02 12:28:36 +01:00
Arjen Poutsma
7a4207cd7b
Changes because HttpMethod changed to class
...
This commit contains changes made because HttpMethod changed from enum
to class.
See gh-27697
2021-11-30 13:44:36 +01:00
Rossen Stoyanchev
dcc342ccc5
Merge branch '5.3.x' into main
2021-11-24 13:14:55 +00:00
Rossen Stoyanchev
829bed03af
Polishing contribution
...
Closes gh-27723
2021-11-24 13:05:05 +00:00
Andreas Grub
ce0aed216b
Add getter for RequestMappingInfo.BuilderConfiguration
...
This improves support for programmatic registration of mappings to
use the same config as that of the RequestMappingHandlerMapping.
See gh-27723
2021-11-24 13:05:05 +00:00
Rossen Stoyanchev
0d7c562693
Polishing contribution
...
Closes gh-910
2021-11-24 13:05:05 +00:00
/usr/local/ΕΨΗΕΛΩΝ
913cc079af
TagWriter can write empty attribute
...
See gh-910
2021-11-24 13:05:05 +00:00
Arjen Poutsma
259bcd60fb
Change deprecated MimeType specificity usages
...
This commit changes all code that uses now deprecated methods in
MimeType and MediaType.
See gh-27580
2021-11-23 11:49:01 +01:00
Juergen Hoeller
4750a9430c
Early removal of 5.x-deprecated code
...
Closes gh-27686
2021-11-18 09:18:06 +01:00
Arjen Poutsma
17cdd97c37
Merge branch '5.3.x'
2021-11-17 16:57:02 +01:00
Arjen Poutsma
5fbdd6dcfe
Throw exception using capturing patterns in AntPathMatcher
...
Closes gh-27688
2021-11-17 16:52:17 +01:00
Juergen Hoeller
b88ed7f4bb
Update API version and package references for Jakarta EE 9
...
Closes gh-27689
See gh-25354
2021-11-17 12:39:23 +01:00
Christoph Dreis
5c972fcc54
Use Charset variants of URLEncoder and URLDecoder methods
2021-11-10 16:12:11 +01:00
Juergen Hoeller
75036fa0ad
Merge branch '5.3.x'
2021-11-10 14:22:58 +01:00
Juergen Hoeller
2a268701c4
Introduce optimizeLocations flag for resource location filtering on startup
...
This flag is off by default since it requires jar files with directory entries.
Closes gh-27624
2021-11-10 14:21:48 +01:00
Rossen Stoyanchev
22f75d9ea9
Merge branch '5.3.x' into main
2021-10-19 12:35:37 +01:00
Rossen Stoyanchev
05ea991d62
Removing locations logging in ResourceHttpRequestHandler
...
See gh-27575
2021-10-19 12:25:33 +01:00
Sam Brannen
1f248b34f6
Apply "instanceof pattern matching" in spring-webmvc
...
This commit also applies additional clean-up tasks such as the following.
- final fields
- diamond operator (<>) for anonymous inner classes
- try with resources
- multi-catch
This has only been applied to `src/main/java`.
2021-10-17 18:49:02 +02:00
Rossen Stoyanchev
9b9906cfc4
Merge branch '5.3.x' into main
2021-10-14 17:22:29 +01:00
Rossen Stoyanchev
76c9306dda
Adjust logging of resource locations
2021-10-14 17:18:34 +01:00
Rossen Stoyanchev
0705454ce0
Fix typo in Javadoc
...
See gh-27484
2021-10-14 09:42:40 +01:00
liuzhifei
ca999fb38c
fix Javadoc typo in PathMatchConfigurer#setUseSuffixPatternMatch
2021-10-14 09:40:49 +01:00
Rossen Stoyanchev
28a497f3b3
Merge branch '5.3.x' into main
2021-10-13 14:58:07 +01:00
Rossen Stoyanchev
4dac8339ff
Filter non-existing static resource locations
...
Same as a2c52a97ba
, on the WebFlux side.
See gh-27538
2021-10-13 14:40:34 +01:00
Juergen Hoeller
627fc7612d
Merge branch '5.3.x'
...
# Conflicts:
# build.gradle
2021-10-13 13:06:44 +02:00