概括地说,你想创建一个新的PropertyEditor来为你进行规范化,然后将其注册到Controller中,如下所示:
@InitBinder public void initBinder(WebDataBinder binder) { binder.registerCustomEditor(Product.class, new CaseInsensitivePropertyEditor()); }
概括地说,你想创建一个新的PropertyEditor来为你进行规范化,然后将其注册到Controller中,如下所示:
@InitBinder public void initBinder(WebDataBinder binder) { binder.registerCustomEditor(Product.class, new CaseInsensitivePropertyEditor()); }