Go to file
Sam Brannen d902bd7696 Reject ModelMap argument types in WebFlux
Prior to this commit, if ModelMap was used as an argument type in a
WebFlux controller method, the user encountered an exception similar to
the following.

java.lang.IllegalStateException: argument type mismatch
  Controller [example.SampleController]
  Method [java.lang.String example.SampleController.index(org.springframework.ui.ModelMap)] with argument values:
  [0] [type=org.springframework.validation.support.BindingAwareConcurrentModel] [value={}]

However, the above error message is a bit cryptic since the error
occurs while attempting to invoke the controller method with an
instance of BindingAwareConcurrentModel which is not compatible with
ModelMap. More importantly, this error message does not explicitly
convey to the user that a ModelMap is not supported.

This commit improve the diagnostics for the user in such scenarios by
rejecting the use of ModelMap upfront in WebFlux.

Consequently, for the same use case as above, the user now encounters
an exception similar to the following.

java.lang.IllegalStateException:
  Could not resolve parameter [0] in
  java.lang.String example.SampleController.index(org.springframework.ui.ModelMap):
  No suitable resolver

Closes gh-33109
2024-06-27 16:16:48 +02:00
.github Add update-antora-ui-spring.yml workflow 2024-05-27 16:56:13 +02:00
buildSrc Merge branch '6.1.x' 2024-06-11 09:11:42 +02:00
ci Merge branch '6.1.x' 2024-06-21 14:14:26 +02:00
framework-api
framework-bom
framework-docs Merge branch '6.1.x' 2024-06-27 11:40:16 +02:00
framework-platform Merge branch '6.1.x' 2024-06-23 17:44:47 +02:00
gradle Merge branch '6.1.x' 2024-06-10 10:48:49 +01:00
integration-tests
spring-aop Merge branch '6.1.x' 2024-06-06 20:47:02 +02:00
spring-aspects Merge branch '6.1.x' 2024-06-06 20:47:02 +02:00
spring-beans Merge branch '6.1.x' 2024-06-20 13:48:55 +02:00
spring-context Merge branch '6.1.x' 2024-06-27 11:40:16 +02:00
spring-context-indexer
spring-context-support Polish naming for Charset setters in FreeMarker support 2024-06-26 17:51:11 +02:00
spring-core Polish 2024-06-24 18:07:59 +02:00
spring-core-test
spring-expression Polish documentation and implementation of SpEL's Indexer 2024-05-28 15:29:54 +02:00
spring-instrument
spring-jcl
spring-jdbc Remove obsolete field 2024-06-11 16:35:13 +02:00
spring-jms
spring-messaging Merge branch '6.1.x' 2024-06-25 21:19:27 +02:00
spring-orm Merge branch '6.1.x' 2024-06-06 10:06:24 +02:00
spring-oxm
spring-r2dbc
spring-test Use UTF-8 with JSON in MockHttpServletResponse 2024-06-19 09:33:43 +02:00
spring-tx Merge branch '6.1.x' 2024-06-18 18:32:29 +02:00
spring-web Merge branch '6.1.x' 2024-06-27 12:04:59 +02:00
spring-webflux Reject ModelMap argument types in WebFlux 2024-06-27 16:16:48 +02:00
spring-webmvc Set output_encoding in FreeMarkerView implementations 2024-06-27 10:07:47 +02:00
spring-websocket Expose WebSocketMessageBrokerStats contracts 2024-05-27 16:06:32 +02:00
src Revert "Disable warnings for deprecated for removal in Eclipse" 2024-06-06 11:44:09 +02:00
.editorconfig
.gitattributes
.gitignore
.sdkmanrc
CONTRIBUTING.md Update code-of-conduct email 2024-06-10 10:48:06 +01:00
LICENSE.txt
README.md Merge branch '6.1.x' 2024-06-10 10:48:49 +01:00
SECURITY.md
build.gradle
gradle.properties Next development version (v6.1.11-SNAPSHOT) 2024-06-19 15:37:10 +00:00
gradlew
gradlew.bat
import-into-eclipse.md
import-into-idea.md
settings.gradle
update_copyright_headers.sh

README.md

Spring Framework Build Status Revved up by Develocity

This is the home of the Spring Framework: the foundation for all Spring projects. Collectively the Spring Framework and the family of Spring projects are often referred to simply as "Spring".

Spring provides everything required beyond the Java programming language for creating enterprise applications for a wide range of scenarios and architectures. Please read the Overview section of the reference documentation for a more complete introduction.

Code of Conduct

This project is governed by the Spring Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@spring.io.

Access to Binaries

For access to artifacts or a distribution zip, see the Spring Framework Artifacts wiki page.

Documentation

The Spring Framework maintains reference documentation (published and source), GitHub wiki pages, and an API reference. There are also guides and tutorials across Spring projects.

Micro-Benchmarks

See the Micro-Benchmarks wiki page.

Build from Source

See the Build from Source wiki page and the CONTRIBUTING.md file.

Continuous Integration Builds

Information regarding CI builds can be found in the Spring Framework Concourse pipeline documentation.

Stay in Touch

Follow @SpringCentral, @SpringFramework, and its team members on 𝕏. In-depth articles can be found at The Spring Blog, and releases are announced via our releases feed.

License

The Spring Framework is released under version 2.0 of the Apache License.