Skip to content

Commit 16e0ed0

Browse files
committed
Merge branch '7.0.x'
2 parents e244481 + 48262b8 commit 16e0ed0

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

framework-docs/modules/ROOT/partials/web/web-data-binding-model-design.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ It is easy to miss or add others over time that should also be excluded.
3434

3535
By default, `DataBinder` applies both constructor and setter binding.
3636
This is fine with immutable objects and dedicated objects, but for domain objects, you must
37-
remember to declare `allowFields`. To ensure data binding is only used in declarative style where
38-
expected inputs are explicitly declared, you can set `declarativeBinding=true` on `DataBinder`.
39-
In this mode, `DataBinding` applies constructor binding, and additionally setter binding if `allowedFields` is set.
40-
The below shows how to set this flag globally:
37+
remember to set `allowedFields`. To ensure data binding is only used in declarative style where
38+
expected inputs are explicitly declared, you can set `declarativeBinding` on `DataBinder`.
39+
That applies constructor binding always, and setter binding conditionally if `allowedFields` is set.
40+
The below shows how to set this flag globally, or
41+
you can also narrow it through attributes on `ControllerAdvice`:
4142

4243
[source,java,indent=0,subs="verbatim,quotes"]
4344
----

0 commit comments

Comments
 (0)