Commit Graph

749 Commits

Author SHA1 Message Date
Sébastien Deleuze
bc82077350 Merge branch '6.2.x' 2025-02-18 11:57:15 +01:00
Sébastien Deleuze
2576702cda Use public interface for HTTP Interface documentation
Closes gh-34443
2025-02-18 11:57:04 +01:00
Sébastien Deleuze
eae09637a1 Refine Kotlin serialization reference documentation
Closes gh-34437
2025-02-17 18:40:05 +01:00
Sam Brannen
9eae0b6f6f Merge branch '6.2.x' 2025-02-12 16:32:05 +01:00
Sam Brannen
6174055910 Link to @⁠MockitoBean, @⁠MockitoSpyBean, & @⁠TestBean Javadoc from ref docs 2025-02-12 16:31:33 +01:00
Sam Brannen
8a53525209 Merge branch '6.2.x' 2025-02-12 15:55:33 +01:00
Sam Brannen
e31ce359a1 Support @⁠MockitoSpyBean at the type level on test classes
Prior to this commit, @⁠MockitoSpyBean could only be declared on fields
within test classes, which prevented developers from being able to
easily reuse spy configuration across a test suite.

With this commit, @⁠MockitoSpyBean is now supported at the type level
on test classes, their superclasses, and interfaces implemented by
those classes. @⁠MockitoSpyBean is also supported on enclosing classes
for @⁠Nested test classes, their superclasses, and interfaces
implemented by those classes, while honoring @⁠NestedTestConfiguration
semantics.

In addition, @⁠MockitoSpyBean:

- has a new `types` attribute that can be used to declare the type or
  types to spy when @⁠MockitoSpyBean is declared at the type level

- can be declared as a repeatable annotation at the type level

- can be declared as a meta-annotation on a custom composed annotation
  which can be reused across a test suite (see the @⁠SharedSpies
  example in the reference manual)

To support these new features, this commit also includes the following
changes.

- MockitoSpyBeanOverrideProcessor has been revised to support
  @⁠MockitoSpyBean at the type level.

- The "Bean Overriding in Tests" and "@⁠MockitoBean and
  @⁠MockitoSpyBean" sections of the reference manual have been fully
  revised.

See gh-34408
Closes gh-33925
2025-02-12 15:54:54 +01:00
Brian Clozel
7077809561 Configure Kotlin JSON converters as Jackson alternative
Prior to this commit, Spring MVC and WebFlux would consider the
"kotlinx.serialization" JSON codecs and converters in addition to other
JSON alternatives like Jackson, Gson and Jsonb.

This would cause issues because while in most cases this library is only
involved if the type is annotated with "@Serializable", this is not true
for Java enums. In this particular case, the codec shadows Jackson and
causes issues.

This commit now considers kotlinx.serialization JSON support as an
alternative to Jackson. Just like Jsonb and GSON, this is only
auto-detected if Jackson is not present.
We received consistent feedback that kotlinx.serialization is popular in
Kotlin libraries and is often a transitive dependency. As a result, we
cannot consider its presence on the classpath as a strong enough signal
to configure it by default.

Closes gh-34410
2025-02-11 20:05:53 +01:00
Stéphane Nicoll
722701a451 Merge branch '6.2.x' 2025-02-11 16:01:09 +01:00
Stéphane Nicoll
6af19244a5 Polish "Use correct method to retrieve DefaultListableBeanFactory"
See gh-34400
2025-02-11 16:00:34 +01:00
canattofilipe
328dd71f6e Use correct method to retrieve DefaultListableBeanFactory
See gh-34400

Signed-off-by: canattofilipe <canattofilipe@gmail.com>
2025-02-11 15:57:01 +01:00
Sam Brannen
e997e16cd1 Merge branch '6.2.x' 2025-02-05 13:43:46 +01:00
Sam Brannen
819a7c86c1 Clarify component scanning of abstract classes with @⁠Lookup methods
Due to changes in gh-19118, classes that contain @⁠Lookup methods are
no longer required to be concrete classes for use with component
scanning; however, the reference documentation still states that such
classes must not be abstract.

This commit therefore removes the outdated reference documentation and
updates the corresponding Javadoc.

See gh-19118
Closes gh-34367
2025-02-05 13:39:29 +01:00
rstoyanchev
ecf75f2f40 Merge branch '6.2.x' 2025-02-03 15:31:32 +00:00
Pierre Rossato
a9ecf90524 Minor update in WebSocket STOMP documentation
Closes gh-34353

Signed-off-by: Pierre Rossato <pierre.rossato@gmail.com>
2025-02-03 15:10:32 +00:00
Brian Clozel
d4030a87e2 Merge branch '6.2.x' 2025-01-29 18:28:52 +01:00
Brian Clozel
cfe2db0581 Improve reference docs on RestClient.retrieve()
As of Spring Framework 6.2, the `RestClient.retrieve()` method is a
no-op and developers must invoke a terminal operation on the returned
`ResponseSpec` to have any side effect.

This has been documented in the Javadoc and the wiki release notes, but
this commit highlights this as well in the reference documentation.

Closes gh-34334
2025-01-29 18:26:12 +01:00
Sam Brannen
564eb77a52 Merge branch '6.2.x' 2025-01-23 11:00:51 +01:00
Sam Brannen
11fe2987d0 Use appropriate link for Testing chapter
This commit effectively removes a reference to a nonexistent "#testing"
fragment.
2025-01-23 10:58:48 +01:00
Sébastien Deleuze
1115be581a Add primitive type support to Nullness
See gh-34261
2025-01-21 16:32:52 +01:00
Sébastien Deleuze
d83be7c33a Mention the Nullness API in the null safety refdoc
See gh-34261
2025-01-21 15:47:10 +01:00
Brian Clozel
4a95b804e9 Merge branch '6.2.x' 2025-01-20 07:58:13 +01:00
Brian Clozel
46c13adfa8 Document custom HttpServiceArgumentResolver usage
This commit adds a reference documentation section explaining how
applications can use custom `HttpServiceArgumentResolver`
implementations to support complex application types as method
parameters in HTTP interfaces.

Closes gh-34227
2025-01-20 07:57:56 +01:00
Johnny Lim
80a84945ef Fix depth for NullAway subsections in reference docs
Closes gh-34267
Signed-off-by: Johnny Lim <izeye@naver.com>
2025-01-16 07:48:11 +01:00
rstoyanchev
6873427aa7 Merge branch '6.2.x' 2025-01-15 19:04:57 +00:00
rstoyanchev
384d2749c6 Polishing in HttpServiceMethod 2025-01-15 19:03:00 +00:00
rstoyanchev
5150a9a6ad Polishing contribution
Closes gh-34230
2025-01-15 18:31:50 +00:00
Yanming Zhou
a8c5885aff Fix wrong document about RequestHeaderArgumentResolver
Also test is added to verify that.

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>

See gh-34230
2025-01-15 18:31:49 +00:00
rstoyanchev
b8c51a2767 Additional theme removal updates
See gh-33809
2025-01-15 17:17:38 +00:00
rstoyanchev
9f77d5ff1f Remove deprecated ThemeResolver support
See gh-33809
2025-01-15 16:26:16 +00:00
Sam Brannen
6a81de95ab Merge branch '6.2.x' 2025-01-15 17:16:51 +01:00
Sam Brannen
9181cce65f Support @⁠MockitoBean at the type level on test classes
Prior to this commit, @⁠MockitoBean could only be declared on fields
within test classes, which prevented developers from being able to
easily reuse mock configuration across a test suite.

With this commit, @⁠MockitoBean is now supported at the type level on
test classes, their superclasses, and interfaces implemented by those
classes. @⁠MockitoBean is also supported on enclosing classes for
@⁠Nested test classes, their superclasses, and interfaces implemented
by those classes, while honoring @⁠NestedTestConfiguration semantics.

In addition, @⁠MockitoBean:

- has a new `types` attribute that can be used to declare the type or
  types to mock when @⁠MockitoBean is declared at the type level

- can be declared as a repeatable annotation at the type level

- can be declared as a meta-annotation on a custom composed annotation
  which can be reused across a test suite (see the @⁠SharedMocks
  example in the reference manual)

To support these new features, this commit also includes the following
changes.

- The `field` property in BeanOverrideHandler is now @⁠Nullable.

- BeanOverrideProcessor has a new `default` createHandlers() method
  which is invoked when a @⁠BeanOverride annotation is found at the
  type level.

- MockitoBeanOverrideProcessor implements the new createHandlers()
  method.

- The internal findHandlers() method in BeanOverrideHandler has been
  completely overhauled.

- The @⁠MockitoBean and @⁠MockitoSpyBean section of the reference
  manual has been completely overhauled.

Closes gh-33925
2025-01-15 17:13:35 +01:00
Sébastien Deleuze
c71bfc7aed Update null-safety documentation
Closes gh-34140
2025-01-14 12:35:53 +01:00
Sébastien Deleuze
f55c234eb4 Provide guidelines for NullAway
Closes gh-34202
2025-01-08 17:34:24 +01:00
Brian Clozel
c970a6052a Merge branch '6.2.x' 2025-01-08 14:40:41 +01:00
Brian Clozel
9173e13f74 Document that http.client.requests measure the entire HTTP exchange
Closes gh-34201
2025-01-08 14:39:50 +01:00
Sam Brannen
e8788c7e3e Merge branch '6.2.x' 2025-01-07 17:32:42 +02:00
Sam Brannen
cd2fbb1ec5 Properly resolve @⁠TestBean factory method within class hierarchy
Prior to this commit, the search algorithm used to locate a @⁠TestBean
factory method within a test class hierarchy incorrectly found factory
methods declared in subclasses or nested test classes "below" the class
in which the @⁠TestBean field was declared. This resulted in "duplicate
bean override" failures for @⁠TestBean overrides which are clearly not
duplicates but rather "overrides of an override".

This commit ensures that @⁠TestBean factory method resolution is
consistent in type hierarchies as well as in enclosing class
hierarchies (for @⁠Nested test classes) by beginning the search for a
factory method in the class which declares the @⁠TestBean field.

Closes gh-34204
2025-01-07 17:20:52 +02:00
Sébastien Deleuze
e184860ca4 Use "nullness" instead of "nullability"
This commit updates the null-safety documentation to use "nullness"
instead of "nullability" in order to be consistent with the JSpecify
documentation.

See gh-28797
2025-01-07 15:03:05 +01:00
Brian Clozel
2cdc406e71 Merge branch '6.2.x' 2025-01-07 09:04:05 +01:00
Mattias-Sehlstedt
50b1fb0b15 Change the description for the uri client request observation
This commit describes what parts that are removed from the URI template
keyvalue.

Closes: gh-34116
Signed-off-by: Mattias-Sehlstedt <60173714+Mattias-Sehlstedt@users.noreply.github.com>
2025-01-07 09:02:25 +01:00
Stéphane Nicoll
5aab947b6e Merge branch '6.2.x' 2024-12-27 09:33:18 +01:00
Stéphane Nicoll
0cdb8a1657 Polish contribution
Using commas render better than em dashes.

See gh-34165
2024-12-27 09:31:34 +01:00
Brenden Ehlers
fe8c70dddb Fix grammatical structure in "Basic Concepts"
See gh-34165
2024-12-27 09:30:43 +01:00
Sébastien Deleuze
b4a2cdf028 Merge branch '6.2.x' 2024-12-26 13:18:16 +01:00
Sébastien Deleuze
1ed74efa6b Polishing
Closes gh-34148
2024-12-26 13:16:09 +01:00
Brenden Ehlers
eabd574038 Fix XML code snippet
See gh-34148
2024-12-26 13:15:51 +01:00
Stéphane Nicoll
cf49a33ea4 Merge branch '6.2.x' 2024-12-25 09:30:08 +01:00
Brenden Ehlers
6c6e8ad831 Fix typo in link
See gh-34149
2024-12-25 09:29:29 +01:00
Sébastien Deleuze
bccd9e9f11 Merge branch '6.2.x' 2024-12-23 11:15:08 +01:00