diff --git a/framework-docs/modules/ROOT/pages/web/webflux/data-binding.adoc b/framework-docs/modules/ROOT/pages/web/webflux/data-binding.adoc index 7f523c85f2d..d41968aff16 100644 --- a/framework-docs/modules/ROOT/pages/web/webflux/data-binding.adoc +++ b/framework-docs/modules/ROOT/pages/web/webflux/data-binding.adoc @@ -9,7 +9,7 @@ It is a core mechanism of the Spring Framework that helps with application confi In web applications it makes it easy to access query parameters and form data through richly typed objects rather than through maps of string values. To learn more about the data binding mechanism, including constructor and setter binding, property name syntax, type conversion, -and more, see the xref:core/validation/data-binding.adoc[Data binding] in the Core Technologies section. +and more, see xref:core/validation/data-binding.adoc[Data binding] in the Core Technologies section. For annotated controllers, data binding applies to a xref:web/webflux/controller/ann-methods/modelattrib-method-args.adoc[@ModelAttribute] method argument. diff --git a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-data-binding.adoc b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-data-binding.adoc index 63648d2be59..e8d581630b4 100644 --- a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-data-binding.adoc +++ b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-data-binding.adoc @@ -9,7 +9,7 @@ It is a core mechanism of the Spring Framework that helps with application confi In web applications it makes it easy to access query parameters and form data through richly typed objects rather than through maps of string values. To learn more about the data binding mechanism, including constructor and setter binding, property name syntax, type conversion, -and more, see the xref:core/validation/data-binding.adoc[Data binding] in the Core Technologies section. +and more, see xref:core/validation/data-binding.adoc[Data binding] in the Core Technologies section. For annotated controllers, data binding applies to a xref:web/webmvc/mvc-controller/ann-methods/modelattrib-method-args.adoc[@ModelAttribute] method argument. diff --git a/framework-docs/modules/ROOT/partials/web/web-data-binding-model-design.adoc b/framework-docs/modules/ROOT/partials/web/web-data-binding-model-design.adoc index fa7d4ebf36a..09476b10bb7 100644 --- a/framework-docs/modules/ROOT/partials/web/web-data-binding-model-design.adoc +++ b/framework-docs/modules/ROOT/partials/web/web-data-binding-model-design.adoc @@ -30,14 +30,14 @@ For example: NOTE: It is also possible to configure `disallowedFields`, but that's fragile, and due to be https://github.com/spring-projects/spring-framework/issues/36802[deprecated] in Spring Framework 7.1. -It is easy to miss or add others over time that should also be excluded. +It is easy to overlook fields or introduce additional fields over time that should also be excluded. By default, `DataBinder` applies both constructor and setter binding. This is fine with immutable objects and dedicated objects, but for domain objects, you must remember to set `allowedFields`. To ensure data binding is only used in declarative style where expected inputs are explicitly declared, you can set `declarativeBinding` on `DataBinder`. That applies constructor binding always, and setter binding conditionally if `allowedFields` is set. -The below shows how to set this flag globally, or +The following shows how to set this flag globally, or you can also narrow it through attributes on `ControllerAdvice`: [source,java,indent=0,subs="verbatim,quotes"]