貼圖
直接貼代碼
@InitBinder
public void initBinder(WebDataBinder binder) {
//自定義編輯器
CustomDateEditor editor = new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"),true);
//註冊時間編輯器
binder.registerCustomEditor(Date.class, editor);
}