Document that ModelMap is not a supported argument type in WebFlux
Prior to this commit, the "Method Arguments" documentation for WebFlux in the reference manual stated that WebFlux controller methods can accept arguments of type Map, Model, or ModelMap to access the model. However, ModelMap is actually not supported and results in exception due to a type mismatch. This commit updates the documentation to reflect this. In addition, this commit updates related Javadoc and tests to avoid mentioning or using ModelMap in WebFlux. Closes gh-33107
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,7 +46,7 @@ public class ConcurrentModel extends ConcurrentHashMap<String, Object> implement
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new {@code ModelMap} containing the supplied attribute
|
||||
* Construct a new {@code ConcurrentModel} containing the supplied attribute
|
||||
* under the supplied name.
|
||||
* @see #addAttribute(String, Object)
|
||||
*/
|
||||
@@ -55,8 +55,8 @@ public class ConcurrentModel extends ConcurrentHashMap<String, Object> implement
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new {@code ModelMap} containing the supplied attribute.
|
||||
* Uses attribute name generation to generate the key for the supplied model
|
||||
* Construct a new {@code ConcurrentModel} containing the supplied attribute.
|
||||
* <p>Uses attribute name generation to generate the key for the supplied model
|
||||
* object.
|
||||
* @see #addAttribute(Object)
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Generic support for UI layer concepts.
|
||||
* Provides a generic ModelMap for model holding.
|
||||
* <p>Provides generic {@code Model} and {@code ModelMap} holders for model attributes.
|
||||
*/
|
||||
@NonNullApi
|
||||
@NonNullFields
|
||||
|
||||
Reference in New Issue
Block a user