@InitBinder protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); CustomDateEditor editor = new CustomDateEditor(df, false); binder.registerCustomEditor(Date.class, editor); }
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/7999.html