Commit Graph

3056 Commits

Author SHA1 Message Date
Juergen Hoeller c813577908 Consistently use DefaultParameterNameDiscoverer.getSharedInstance()
This includes MethodParameter resolving getParameterName() by default now.
initParameterNameDiscovery(null) can be used to suppress such resolution.

Closes gh-36024
2025-12-17 13:39:02 +01:00
Sébastien Deleuze d4e4250bb1 Remove JavaScript/Kotlin from ScriptEngine documentation
Closes gh-27919
2025-12-15 18:43:09 +01:00
rstoyanchev 0eefac21c9 Polishing contribution
Closes gh-35758
2025-12-10 18:17:12 +00:00
Samuel Gulliksson e99791f289 Improve i18n-support for NoResourceFoundException.
Return the requested resource as ErrorResponse.getDetailMessageArguments,
making it usable with message customization and i18n.

See gh-35758

Signed-off-by: Samuel Gulliksson <samuel.gulliksson@gmail.com>
2025-12-10 18:17:12 +00:00
Juergen Hoeller 07c0213f20 Polishing 2025-12-04 00:12:31 +01:00
rstoyanchev 15c16d2c3a FragmentsRendering exposes its fragments
Closes gh-35775
2025-12-01 11:17:40 +00:00
Juergen Hoeller c6810334ca Move extended web data binders to common support packages
This resolves cyclic dependencies between function and annotation-based packages.

See gh-35800
2025-11-30 11:31:04 +01:00
rstoyanchev a9a404266c Data binding from pathvars and headers in fn handlers
Closes gh-35800
2025-11-26 12:30:48 +00:00
rstoyanchev b29f4ed37e Minor refactoring in DefaultServerRequest
Ensure bind logic is shared across DefaultServerRequest and
BuiltServerRequest.

See gh-35800
2025-11-26 12:30:48 +00:00
rstoyanchev 4847ee80b0 Add required type to TypeMismatchException message args
Closes gh-35837
2025-11-26 12:30:48 +00:00
Sébastien Deleuze 2641b5d783 Polishing
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
See gh-35861
2025-11-26 10:27:01 +01:00
Vincent Potucek 83bbf16e6c Modernize java.time API usages
See gh-35861
Signed-off-by: Vincent Potucek <vpotucek@me.com>
2025-11-26 10:24:34 +01:00
rstoyanchev fb8bbe838d Polishing in RouterFunctions
See gh-35791
2025-11-12 10:52:04 +00:00
rstoyanchev dff0858340 Update generics on WebMvc RouterFunctions.Builder
Same as 7555d0e489, but for WebMvc.

Closes gh-35791
2025-11-12 08:07:36 +00:00
Juergen Hoeller 15a3f425cb Merge branch '6.2.x'
# Conflicts:
#	spring-core/src/main/java/org/springframework/util/ConcurrentReferenceHashMap.java
2025-11-11 15:42:11 +01:00
Juergen Hoeller 5c5367a1be Polishing 2025-11-11 15:40:08 +01:00
Sam Brannen c6b4b43076 Merge branch '6.2.x' 2025-11-10 15:39:18 +01:00
Sam Brannen 335a2c4e21 Support response encoding in `select` and `options` JSP form tags
Prior to this commit, Spring Framework's JSP form tags supported the
response encoding in most places; however, <form:select> and
<form:options> still did not support the response character encoding.

To address that, this commit updates SelectTag, OptionsTag, and
OptionWriter to provide support for response character encoding in the
`select` and `options` JSP form tags.

See gh-33023
Closes gh-35783
2025-11-10 15:35:13 +01:00
Sébastien Deleuze d64edc01c0 Prevent Kotlin Serialization converters side effects
This commit updates Kotlin serialization converters to perform
an additional check invoking
KotlinDetector#hasSerializableAnnotation to decide if the
related type should be processed or not.

The goal is to prevent in the default arrangement conflicts
between general purpose converters like Jackson and
Kotlin serialization when both are used.

New constructors allowing to specify a custom predicate
are also introduced.

See gh-35761
2025-11-10 11:35:44 +01:00
rstoyanchev b128f59714 Expose handler to ApiVersionDeprecationHandler implementations
Closes gh-35750
2025-11-05 12:23:59 +00:00
rstoyanchev 183a9466c5 Add dedicated ApiVersionResolver implementations
Closes gh-35747
2025-11-03 09:19:38 +00:00
Brian Clozel af026c0373 Review HttpMessageConverters semantics in Builder
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
Prior to this commit, the `HttpMessageConverters` builder API had
methods like "jsonMessageConverter" for configuring a specific converter
for JSON support. This converter would be always configured at a given
position, even if default converters registration is not requested.
On the other hand, `customMessageConverter` would add any converter
ahead of the list, in all cases. This difference was not conveyed as it
should by the API.

This commit makes the following changes:

* builder methods are renamed to `withJsonConverter` and variants, to
  better convey the fact that those are replacing the default converter
  for a given format.
* `customMessageConverter` is renamed to `addCustomConverter` to better
  reflect the additive aspect.
* the JavaDoc has been updated accordingly
* `withJsonConverter` and others are now only effective if the default
  registration of auto-detected converters is requested. This better
  aligns with the behavior in the reactive codecs configuration

Closes gh-35704
2025-10-31 17:18:28 +01:00
Sébastien Deleuze 7509e257d1 Remove outdated Portlet mentions
Closes gh-35726
2025-10-30 16:02:15 +01:00
rstoyanchev b5557160e0 Merge branch '6.2.x' 2025-10-30 12:24:39 +00:00
rstoyanchev 715bc68c16 Rename methods in FragmentsRendering
Previous commit 81ea35c726 in main for 7.0
should have been applied in 6.2.x first for 6.2.1.

This commit applies the changes in 6.2.x as intended,
effective as of 6.2.13.

Closes gh-33974
2025-10-30 12:17:51 +00:00
Sébastien Deleuze 694224f1a6 Remove outdated Spring version mentions
Close gh-35696
2025-10-28 13:58:09 +01:00
Juergen Hoeller 7adcd99ea2 Polishing
Backport Bot / build (push) Waiting to run Details
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:25], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
2025-10-21 00:59:56 +02:00
Juergen Hoeller 7ca2a5dec5 Early support for Jakarta Servlet 6.2 and Jakarta Activation 2.2
Closes gh-35670
2025-10-21 00:42:03 +02:00
Juergen Hoeller 527643f142 Merge branch '6.2.x' 2025-10-15 19:41:20 +02:00
Juergen Hoeller c53132ecdf Polishing
Backport Bot / build (push) Waiting to run Details
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:25], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
2025-10-15 19:40:09 +02:00
Brian Clozel e6481a011b Deprecate "feed" and "document" view packages
Prior to this commit, Spring Framework would ship several abstract
`*View` implementations for rendering PDF, RSS or XLS documents using
well-known libraries. More recently, supporting libraries evolved a lot
with new versions and forks. Spring Framework is not in a position to
efficiently support all variants within the project.

This commit deprecates the relevant classes. Instead, libraries can
reuse existing code and ship optional support for Spring directly.
Often, updating imports and library usage is enough.
As an alternative, applications can decide to perform rendering
direclty in web handlers.

Closes gh-35451
2025-10-15 16:36:24 +02:00
Sébastien Deleuze 8ec9ab6698 Add builder-based constructors to Jackson 3 infrastructure
This commit also polishes documentation, constructor parameter and
field names.

Closes gh-35597
2025-10-15 11:49:55 +02:00
rstoyanchev 43c13ca043 Polishing contribution
Closes gh-35348
2025-10-14 11:37:40 +01:00
秦利斌 17cf2ad457 MvcUriComponentsBuilder resolves embedded values
See gh-35348

Signed-off-by: 秦利斌 <68638598+Allan-QLB@users.noreply.github.com>
2025-10-14 11:37:24 +01:00
Sam Brannen 0389684429 Revise contribution
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Has been cancelled Details
Deploy Docs / Dispatch docs deployment (push) Has been cancelled Details
Build and Deploy Snapshot / Verify (push) Has been cancelled Details
See gh-35352
2025-10-11 19:37:34 +02:00
yongjunhong 8edc7cd542 Reject effectively private handler methods on CGLIB proxied controllers
This commit rejects the invocation of an effectively private handler
method on a CGLIB proxied controller for both Spring MVC and Spring
WebFlux.

Closes gh-35352

Co-authored-by: Sam Brannen <104798+sbrannen@users.noreply.github.com>
Signed-off-by: Yongjun Hong <kevin0928@naver.com>
Signed-off-by: yongjunhong <yongjunh@apache.org>
2025-10-11 19:27:06 +02:00
Sam Brannen 19b4021d26 Polish tests 2025-10-10 18:45:20 +02:00
Juergen Hoeller edc14c2e15 Merge branch '6.2.x'
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
# Conflicts:
#	spring-context-indexer/src/main/java/org/springframework/context/index/processor/StandardStereotypesProvider.java
#	spring-context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java
#	spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java
2025-10-09 20:37:49 +02:00
Juergen Hoeller c2a66e723f Polishing
Backport Bot / build (push) Waiting to run Details
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:25], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
2025-10-09 20:34:03 +02:00
Sam Brannen 48ec990a17 Fix typos 2025-10-01 11:53:01 +02:00
Sam Brannen 8dd64602e8 Avoid warnings with AssertJ APIs 2025-09-29 17:11:42 +02:00
rstoyanchev 2e915a3934 Provide access to API version in controller method
Closes gh-35424
2025-09-26 17:32:38 +01:00
Manu Sridharan e834a3a80c Nullability fixes for AtomicReference variables
Closes gh-35514
Signed-off-by: Manu Sridharan <msridhar@gmail.com>
2025-09-25 07:39:44 +02:00
Sam Brannen 051adf267f Introduce MapAccessor in SpEL and deprecate existing implementation
Prior to this commit, the MapAccessor for SpEL resided in the
org.springframework.context.expression package in the spring-context
module; however, it arguably should reside in the spring-expression
module so that it can be used whenever SpEL is used (without requiring
spring-context).

This commit therefore officially deprecates the MapAccessor in
spring-context for removal in favor of a new copy of the implementation
in the org.springframework.expression.spel.support package in the
spring-expression module.

Closes gh-35537
2025-09-24 16:52:27 +02:00
Sam Brannen d84bf18408 Upgrade to JUnit 6.0 RC3
See gh-35124
2025-09-23 16:19:54 +02:00
Sébastien Deleuze c79e4e230b Reinstantiate checks for kotlin-reflect
This commit reinstantiates checks for kotlin-reflect (via static final
fields for faster Java code paths and better native code removal) which
were removed as part of gh-34275, which did not consider the
increasingly popular use cases where kotlin-stdlib is present in the
classpath as a transitive dependency in Java applications.

Closes gh-35511
2025-09-22 18:33:38 +02:00
Sébastien Deleuze 7635ac38f6 Use uppercase for classpath-related static final field names
Closes gh-35525
2025-09-22 18:32:14 +02:00
Sam Brannen 0c61ac956b Add missing @⁠Override annotations
... and suppress "serial" warnings
2025-09-22 13:20:37 +02:00
Juergen Hoeller 015edb33cd Merge branch '6.2.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2025-09-17 18:27:04 +02:00
Juergen Hoeller bf715ac23e Polishing 2025-09-17 18:10:19 +02:00