をsubmiitingながら、私は次のコードを使用して、日付の書式を設定しています:として春日付変換エラーフォーム
@InitBinder
public void initBinder(final WebDataBinder binder) {
binder.initDirectFieldAccess();
final SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
dateFormat.setLenient(false);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
}
とJSPから同じ形式で日付を送るが、エラーを取得する:
失敗型[Java.Lang.String]のプロパティ値を必須型に変換するには[Java.Util.Date]プロパティBidDate;ネストされた例外は、java.lang.IllegalArgumentExceptionがです:日付を解析できませんでした:解析できない日:「2017年5月28日は」