第1个回答 2015-02-10
因此,在你的表单物件中,你不必以简单、非类型化的字符串来复制你的业务物件的属性,只须简单地处理无效的提交,或者正确地转换字符串。
~~~~~~~~~纯人手翻译,欢迎采纳~~~~~~~~~
(非计算机专业,仅供参考)
这一句连上下文如下:
In Spring Web MVC you can use any object as a command or form-backing object; you do not need to implement a framework-specific interface or base class. Spring’s data binding is highly flexible: for example, it treats type mismatches as validation errors that can be evaluated by the application, not as system errors. Thus you need not duplicate your business objects' properties as simple, untyped strings in your form objects simply to handle invalid submissions, or to convert the Strings properly. Instead, it is often preferable to bind directly to your business objects.本回答被网友采纳