Commit Graph

784 Commits

Author SHA1 Message Date
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
Tran Ngoc Nhan ebae02a92b Fix broken links in the web reference documentation
Closes gh-34115
2024-12-23 11:14:40 +01:00
Sam Brannen 5b8e436c98 Merge branch '6.2.x' 2024-12-21 15:31:29 +01:00
Sam Brannen 724700d708 Polishing 2024-12-21 15:31:01 +01:00
Andreas Kruck 83ba7e69ec Fix minor typo in reference documentation for Kotlin annotations
Closes gh-34134
2024-12-21 15:28:33 +01:00
rstoyanchev 373763723e Deprecate use of PathMatcher and UrlPathHelper in web
Closes gh-34018
2024-12-19 15:59:41 +00:00
rstoyanchev 41a9db376d Deprecate pathExtension routing predicates
Closes gh-34103
2024-12-19 15:59:18 +00:00
Sébastien Deleuze ef06bf4e74 Refine null-safety migration documentation
See gh-28797
2024-12-19 11:38:26 +01:00
Sébastien Deleuze 6d2d10cffe Update null-safety documentation
This commit documents using JSpecify instead of the now deprecated
Spring null-safety annotations.

Closes gh-28797
2024-12-19 11:07:33 +01:00
rstoyanchev 4b9f1732f1 Remove remaining Spring MVC trailing slash matching
Closes gh-34036
2024-12-17 11:14:00 +00:00
Brian Clozel 4fd368b1af Deprecate mvc XML configuration namespace
This commit deprecates the `<mvc:*` XML configuration namespace for
configuring Spring MVC applications. This configuration model is lagging
behind in the 6.x generation already and we don't intend to invest in
this space to close that gap.

As of 7.0, using this XML namespace will result in a WARN log message.
This commit also states our intent in the reference documentation.

Closes gh-34063
2024-12-17 11:55:08 +01:00
rstoyanchev 7f4da52cc5 Remove Spring MVC path extension content negotiation
See gh-34036
2024-12-17 09:49:07 +00:00
Juergen Hoeller 3db1b94465 Replace spring-jcl with regular Apache Commons Logging 1.3
Closes gh-32459
2024-12-12 17:37:11 +01:00
Stéphane Nicoll 7a6ba43402 Merge branch '6.2.x' 2024-12-12 17:32:50 +01:00
Stéphane Nicoll 2c32601553 Add note about using @EventListener on lazy beans
Closes gh-34057
2024-12-12 17:32:18 +01:00
Brian Clozel 3edb256298 Update websocket reference docs
See gh-33744
2024-12-08 20:12:57 +01:00
Stéphane Nicoll 6d28ac6b2c Merge branch '6.2.x' 2024-12-06 09:44:05 +01:00
Tran Ngoc Nhan 47c66f4352 Fix link to MockMvcBuilders in reference documentation
See gh-34031
2024-12-06 09:43:41 +01:00
Sébastien Deleuze 75e57475ca Upgrade to Kotlin 2.1.0
Spring Framework 7.0 will use a Kotlin 2 baseline, using the latest 2.x
release at the time of the release.

This commit upgrades Kotlin to 2.1.0, and Kotlin Serialization and
Coroutines accordingly.

Closes gh-33629
2024-12-05 11:42:00 +01:00
Sébastien Deleuze 3eb5b8263b Remove documentation for Kotlin Script Templates
Closes gh-34029
2024-12-05 11:19:42 +01:00
Juergen Hoeller 2b9010c2a2 Remove APIs marked as deprecated for removal
Closes gh-33809
2024-12-04 13:19:39 +01:00
Juergen Hoeller 949432ce8b General upgrade to Jakarta EE 11 APIs
Includes removal of ManagedBean and javax.annotation legacy support.
Includes AbstractJson(Http)MessageConverter revision for Yasson 3.0.
Includes initial Hibernate ORM 7.0 upgrade.

Closes gh-34011
Closes gh-33750
2024-12-03 13:30:25 +01:00
Brian Clozel c213724a47 Document Servlet PushBuilder API deprecation
See gh-33918
2024-11-28 15:55:53 +01:00
rstoyanchev 81ea35c726 Update method names in FragmentsRendering
Closes gh-33974
2024-11-27 11:21:51 +00:00
Tran Ngoc Nhan 8c0ac8e062 Fix a typo in the filters documentation
Closes gh-33959
2024-11-26 16:09:45 +01:00
Sam Brannen 7a6e401d17 Document visibility requirements for Bean Overrides
This commit makes it clear that there are no visibility requirements
for @⁠TestBean fields or factory methods as well as @⁠MockitoBean or
@⁠MockitoSpyBean fields.

Closes gh-33923
2024-11-20 16:49:52 +01:00
Sam Brannen 3569cfe990 Reject static Bean Override fields for @⁠MockitoBean, @⁠TestBean, etc.
Closes gh-33922
2024-11-20 11:29:01 +01:00
Sam Brannen dd92eac3ad Refer to message "receipt" instead of "reception" 2024-11-19 13:18:12 +01:00
Sam Brannen 874f056984 Polishing 2024-11-19 13:18:12 +01:00
Tran Ngoc Nhan b77db64459 Fix typos and link in Observability documentation
Closes gh-33910
2024-11-19 12:12:01 +01:00
Sam Brannen 807e1e6126 Document support for varargs invocations in SpEL
Closes gh-33332
2024-11-18 11:54:22 +01:00
Sam Brannen 7196f3f554 Polish SpEL documentation 2024-11-18 11:38:20 +01:00
Sam Brannen a12d40e10b Fix SpEL examples in reference guide
Closes gh-33907
2024-11-18 11:37:30 +01:00
Sam Brannen 241b8b48f2 Clarify requirements for AOP around advice regarding MethodInterceptor
Closes gh-33901
2024-11-17 12:23:01 +01:00
Sam Brannen 173084f81a Polish Spring AOP documentation 2024-11-17 12:21:16 +01:00
Sam Brannen cca245020d Improve documentation for SpelCompilerMode
Closes gh-33223
2024-11-14 11:36:46 +01:00
Sam Brannen 973d815763 Merge branch '6.1.x' 2024-11-14 10:16:02 +01:00
Sam Brannen 1e95332f62 Fix link to "Resources" section in reference guide
Closes gh-33882
2024-11-14 10:15:34 +01:00
Sam Brannen b523f3caff Polish documentation and exception message for @⁠DurationFormat 2024-11-13 17:19:53 +01:00
Sam Brannen 7f9901d35d Merge branch '6.1.x' 2024-11-13 16:46:11 +01:00
Sam Brannen bfde33a514 Document options for Date/Time parsing & formatting issues with JDK 20+
This commit updates Javadoc and the reference guide to document options
for handling date/time parsing and formatting issues on JDK 20 and higher.

A new "Date and Time Formatting with JDK 20 and higher" page has also been
introduced in the wiki.

https://github.com/spring-projects/spring-framework/wiki/Date-and-Time-Formatting-with-JDK-20-and-higher

Closes gh-33151
2024-11-13 16:39:40 +01:00
Sam Brannen d92c57f7a5 Merge branch '6.1.x' 2024-11-13 14:23:52 +01:00
Sam Brannen 4d792d0e45 Remove mentions of Joda-Time support
Since Joda-Time support was removed in Spring Framework 6.0, this commit
removes obsolete mentions of Joda-Time in the reference guide and Javadoc.

See gh-27426
Closes gh-33881
2024-11-13 14:16:14 +01:00
Sam Brannen 525407e4b1 Merge branch '6.1.x' 2024-11-12 20:50:46 +01:00
Tran Ngoc Nhan 53b9a2cb78 Fix formatting issue in validation section of reference guide
Closes gh-33871
2024-11-12 20:49:56 +01:00
Tran Ngoc Nhan 85cf563741 Fix typo in reference documentation
See gh-33865
2024-11-12 10:04:06 +01:00
Tran Ngoc Nhan 8afd01ba2c Fix typo in reference documentation
See gh-33865
2024-11-10 14:45:19 +09:00
Sam Brannen 1ced8c3856 Merge branch '6.1.x' 2024-11-07 12:26:21 +01:00
Sam Brannen 0d9033592b Document that circular dependencies should be avoided in AOT mode
Closes gh-33786
2024-11-07 12:23:39 +01:00
Sam Brannen fc7b8ae966 Fix anchor name, consistently use title case, and polish wording
(cherry picked from commit 2e6c8daec6)
2024-11-07 12:22:25 +01:00
Sam Brannen c457131f1c Fix heading level for "Programmatic bean registration" in AOT chapter
(cherry picked from commit 9f0dbc4051)
2024-11-07 12:22:02 +01:00
Sam Brannen fd676ed932 Merge branch '6.1.x' 2024-11-07 10:44:47 +01:00
Sam Brannen 05a880e3b5 Fix XML bean reference example in reference manual
Closes gh-33855
2024-11-07 10:44:01 +01:00
Sam Brannen 2e6c8daec6 Fix anchor name, consistently use title case, and polish wording 2024-11-06 17:46:06 +01:00
Sébastien Deleuze fb98d74a47 Merge branch '6.1.x' 2024-11-06 10:09:13 +01:00
Hosam Aly 4ef2b429e0 Fix a typo in beanvalidation.adoc
ContraintViolation => ConstraintViolation

Closes gh-33846
2024-11-06 10:09:05 +01:00
Juergen Hoeller a1f6098158 Merge branch '6.1.x' 2024-10-29 23:04:05 +01:00
Juergen Hoeller fa21dffcf8 Restore traditional AspectJ behavior through "spring.aop.ajc.ignore=true"
Closes gh-33704
2024-10-29 23:01:16 +01:00
Sam Brannen 81d89f478a Relax singleton enforcement for Bean Overrides in the TestContext framework
In gh-33602, we introduced strict singleton enforcement for bean
overrides -- for example, for @⁠MockitoBean, @⁠TestBean, etc. However,
the use of BeanFactory#isSingleton(beanName) can result in a
BeanCreationException for certain beans, such as a Spring Data JPA
FactoryBean for a JpaRepository.

In light of that, this commit relaxes the singleton enforcement in
BeanOverrideBeanFactoryPostProcessor by only checking the result of
BeanDefinition#isSingleton() for existing bean definitions.

This commit also updates the Javadoc and reference documentation to
reflect the status quo.

See gh-33602
Closes gh-33800
2024-10-28 12:45:05 +01:00
Sam Brannen 9f0dbc4051 Fix heading level for "Programmatic bean registration" in AOT chapter 2024-10-24 16:43:17 +02:00
Brian Clozel acccbbec3f Document UrlHandler Servlet and reactive filters
Closes gh-33784
2024-10-24 16:14:18 +02:00
Sam Brannen 3b82733e1f Support @⁠Mockito[Spy]Bean & @⁠TestBean w/ @⁠DirtiesContext "before method" modes
Closes gh-33783
2024-10-24 15:06:03 +02:00
Brian Clozel 20d21a8251 Rework links to Spring Boot in reference docs
Closes gh-33776
2024-10-23 16:10:37 +02:00
Nicklas Wiegandt a0af708c03 Add cookie support to RestClient
See gh-33697
2024-10-23 11:38:18 +01:00
Brian Clozel d8c153a9d1 Remove support for Resin Servlet container
This commit removes all references to the Resin Servlet container, as it
is not supported as of Spring Framework 6.0 because we require a
JakartaEE baseline.

Closes gh-33772
2024-10-23 10:10:29 +02:00
Sébastien Deleuze 2b0c1fa210 Improve the discoverability of Java and Kotlin APIs
This commit add external links in the refdoc to Java
and Kotlin APIs to make them more discoverable.

Closes gh-32835
2024-10-22 08:40:28 +02:00