我怎样才能给日期的多种格式中CustomEditor的InitBinder?
这是控制器内部的活页夹.
@InitBinder
public void binder(WebDataBinder binder) {
binder.registerCustomEditor(Date.class,
new CustomDateEditor(new SimpleDateFormat("dd-MM-yyyy"), true));
}
Run Code Online (Sandbox Code Playgroud)
现在我也希望格式化日期mm/dd/yyyy,即两种格式都需要.怎么做到这一点?