1
は、我々は、すべての
initBinder
メソッド内のコントローラで日付の検証の古典的な例を知って
@InitBinder
public void initBinder(WebDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm");
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
}
しかし、新しいJavaの8時間をサポートするための代替するものですAPI、DateFormat
をDateTimeFormatter
に置き換える必要がありますか? Spring Frameworkはこれに対してどんなツールを提供していますか?
ありがとうございました。