Commit Graph

31788 Commits

Author SHA1 Message Date
Juergen Hoeller
b2d43f54e0 Merge branch '6.1.x' 2024-05-10 12:29:49 +02:00
Juergen Hoeller
bf08e0c1b4 Polishing 2024-05-10 12:27:29 +02:00
Juergen Hoeller
9202c0ad41 Accept ajc-compiled @Aspect classes for Spring AOP proxy usage
Closes gh-32793
2024-05-10 12:27:12 +02:00
earlgrey02
797f586f9a Polish RouterFunctionDsl
Place the lambda outside the method call.

Closes gh-32765
2024-05-10 12:15:22 +02:00
Sébastien Deleuze
8ac39d0062 Polishing 2024-05-10 11:57:42 +02:00
Sébastien Deleuze
7985ab33f4 Throw an exception for suspending factory methods
Suspending factory methods are not supported, and can
have side effects, so it is better to fail explicitly
for such use case.

Closes gh-32719
2024-05-10 11:56:50 +02:00
Yanming Zhou
a02861f7db Insist on using CollectionUtils.isEmpty() and StringUtils.hasLength()
search `(\w+) != null && !(\1).isEmpty\(\)`
2024-05-09 09:25:09 +02:00
Yanming Zhou
8137cc9566 Polishing 2024-05-08 18:20:13 +02:00
Juergen Hoeller
7b16988ec9 Merge branch '6.1.x' 2024-05-08 17:52:42 +02:00
Juergen Hoeller
22b6d66a28 Document @Order behavior on @Configuration classes versus @Bean methods
Includes brief note on self injection (extracted from qualifiers section).

Closes gh-30177
Closes gh-28299
2024-05-08 17:52:02 +02:00
Juergen Hoeller
9376e6322d Revise IoC container introduction for modern configuration styles
Includes @Configuration(proxyBeanMethods=false) documentation.

Closes gh-32429
2024-05-08 17:51:25 +02:00
Juergen Hoeller
0eb937a866 Document limitations of CGLIB proxy class generation in JPMS module setups
Includes extended exception messages with common hints and explanations.

Closes gh-32671
2024-05-08 17:51:17 +02:00
Stéphane Nicoll
8d90817ba3 Polish and fix build failure 2024-05-08 15:59:28 +02:00
Stéphane Nicoll
36295e664a Merge branch '6.1.x' 2024-05-08 15:47:10 +02:00
Stéphane Nicoll
6250b64766 Add support for form data in MockHttpServletRequestBuilder
Closes gh-32757
2024-05-08 11:56:16 +02:00
Sam Brannen
3ce79c3fbf Polishing 2024-05-08 11:54:55 +03:00
Chad Attermann
cb48077698 Adds support for qualifying columns with table.
Adds support common in other ResultSet implemenatations for qualifying column names with table name to distinguish potentially duplicate column names in a join of two or more tables from one another. The expected format is {table_name}.{column_namne}, where column_name is the actuall designated column name and not the column label.
2024-05-08 10:35:55 +02:00
Stéphane Nicoll
2d942a6e91 Merge branch '6.1.x' 2024-05-08 10:30:19 +02:00
Stéphane Nicoll
5b1278d03c Refine exception message to include bean name
Closes gh-32775
2024-05-08 10:27:34 +02:00
Stéphane Nicoll
168276aaab Review AssertJ support for MockMvc
Closes gh-32712
2024-05-07 16:30:44 +02:00
Stéphane Nicoll
bcecce7aac Add shortcuts for frequently used assertions
See gh-32712
2024-05-07 16:28:44 +02:00
Stéphane Nicoll
c8967de065 Provide better name for entry points
This commit renames AssertableMockMvc to MockMvcTester as the former
was too mouthful, and we are looking for a naming pattern that can be
applied consistently to test utilities that rely on AssertJ.

Rather than AssertableMvcResult, we now use MvcTestResult and it no
longer extends from MvcResult itself. That avoids having existing code
that is migrated to the new API whilst assigning the result to MvcResult
and get a bad DevXP as that doesn't bring any of the AssertJ support.

See gh-32712
2024-05-07 16:28:44 +02:00
Stéphane Nicoll
5567d14700 Move response body directly in AbstractMockHttpServletResponseAssert
This commit removes ResponseBodyAssert and rather offers first-class
access support for the response body at the root level using bodyText(),
bodyJson(), and body().

This avoids a double navigation to assert the response body.

See gh-32712
2024-05-07 16:28:44 +02:00
Stéphane Nicoll
24cc77655f Merge JSON assertions in a single Assert type
This commit merges the JSONCompare and JsonPath support in a single
assert object. The rationale for the previous situation was that
JsonPath is optional but merging the assertions methods do not make
it mandatory as the usage if JsonPath is triggered only if it is
actually used.

See gh-32712
2024-05-07 16:28:44 +02:00
Juergen Hoeller
645556a28c Merge branch '6.1.x' 2024-05-07 15:53:00 +02:00
Juergen Hoeller
4f02be263f Polishing 2024-05-07 15:52:13 +02:00
Sam Brannen
ac0136b75c Clarify supported targets for annotations in the TestContext framework
Closes gh-32772
2024-05-07 16:45:12 +03:00
Juergen Hoeller
3048cfe9d9 Polishing 2024-05-06 20:16:07 +02:00
Juergen Hoeller
d9ca263065 Merge branch '6.1.x' 2024-05-06 20:11:56 +02:00
Juergen Hoeller
05d9b52b19 Polishing 2024-05-06 20:10:40 +02:00
Juergen Hoeller
59a125d06f Unwrap raw target Query instance in case of proxy mismatch
Closes gh-32766
2024-05-06 20:09:43 +02:00
Sébastien Deleuze
39889744b0 Polish JdbcTemplate Best Practices section 2024-05-06 18:28:54 +02:00
Sébastien Deleuze
12272d6e41 Remove unneeded @SuppressWarnings("NullAway")
Closes gh-32542
2024-05-06 18:28:54 +02:00
Stéphane Nicoll
93dcbc41b0 Polish 2024-05-06 17:40:23 +02:00
Stéphane Nicoll
371d1a02f2 Fix typo 2024-05-06 17:38:52 +02:00
Sébastien Deleuze
04944a1f56 Modernize the lazy-initialized beans refdoc section
Closes gh-32767
2024-05-06 17:08:49 +02:00
Sébastien Deleuze
c6459b40e4 Modernize the integration section of the refdoc
This commit adds Java and Kotlin tabs to XML code snippets where
relevant, and leverages code includes.

Closes gh-32600
2024-05-06 16:05:35 +02:00
Sam Brannen
bdc4ecd599 Merge branch '6.1.x'
# Conflicts:
#	spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java
2024-05-03 17:12:40 +03:00
Sam Brannen
aebc48ee8d Revise contribution
See gh-32704
2024-05-03 17:04:11 +03:00
Mikaël Francoeur
f51be0a17e Support varargs invocations in SpEL for varargs array subtype
Closes gh-32704
2024-05-03 17:04:11 +03:00
Sam Brannen
1d2b5a15c3 Polishing 2024-05-03 17:04:11 +03:00
Arjen Poutsma
92f54da628 Bug fixes in WebMvc.fn testing support
See gh-30477
2024-05-03 14:28:21 +02:00
Arjen Poutsma
8bca7cd8e7 Various UrlParser improvements
- Consistent use of codePointAt instead of charAt.
- Fix bug in domainToAscii

See gh-32513
2024-05-03 13:41:56 +02:00
Arjen Poutsma
4df80a8d09 Various CPU and memory improvements in UrlParser
Improvements include:
- Replace throwing exceptions with failure results in hot areas,
- Verify digits of a string before passing it to Integer::parseInt
- Lazily initialization of fields
- Using LinkedList instead of ArrayList where size is not known
  beforehand

See gh-32513
2024-05-03 13:41:55 +02:00
Sam Brannen
12b285add3 Polishing 2024-05-03 14:03:50 +03:00
Sam Brannen
b0a2f269cb Merge branch '6.1.x' 2024-05-03 12:18:34 +03:00
Sam Brannen
4baad16437 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
2024-05-03 12:18:04 +03:00
Sébastien Deleuze
8de7c64637 Upgrade to webjars-locator-lite 1.0.0
Closes gh-32564
2024-05-03 09:38:31 +02:00
Stéphane Nicoll
305ebca56d Merge branch '6.1.x' 2024-05-02 17:02:08 +02:00
Stéphane Nicoll
abcc1dfc6c Review usage of BindingReflectionHintsRegistrar#registerReflectionHints
Closes gh-32753
2024-05-02 16:53:59 +02:00