运动网站源码,镇江钻点网络科技,烟台建网站公司,网站引擎友好性分析html、js前台数据传到后台#xff0c;spring复杂类型转换如果我有两个变量#xff0c;变量名不一样#xff0c;处理的规则也不一样#xff0c;但是他们都是Date.class 类型#xff0c; 这可怎么破。比如#xff1a;InitBinderpublic void bindingPreparation(WebDataBind…html、js前台数据传到后台spring复杂类型转换如果我有两个变量变量名不一样处理的规则也不一样但是他们都是Date.class 类型 这可怎么破。比如InitBinderpublic void bindingPreparation(WebDataBinder binder) {DateFormat dateFormat1 new SimpleDateFormat(d-MM-yyyy);CustomDateEditor orderDateEditor new CustomDateEditor(dateFormat1, true);DateFormat dateFormat2 new SimpleDateFormat(MMM d, YYYY);CustomDateEditor shipDateEditor new CustomDateEditor(dateFormat2, true);binder.registerCustomEditor(Date.class, orderDate, orderDateEditor);binder.registerCustomEditor(Date.class, shipDate, shipDateEditor);}spring中有很多种propertyEditor