日までの文字列から変換することはできません。春の検証:しかし、私は取得しています、私はいくつかの春のフォーム検証をやってる
Failed to convert property value of type 'java.lang.String' to required type 'ja
va.util.Date' for property 'birthdate'; nested exception is java.lang.Illega
lStateException: Cannot convert value of type [java.lang.String] to required typ
e [java.util.Date] for property 'birthdate': no matching editors or conversi
on strategy found
しかし、私のmodelAttributeの形で私が持っている:
@NotNull
@Past
@DateTimeFormat(style="S-")
private Date birthdate;
DateTimeFormatがこれを担当していると思いましたか?
私はhibernate-validator 4.0を使用しています。
''はありますか? –
axtavt
これはポートレットにあり、mvc:annotation-drivenは機能しません。私が使用します。 \t \t <豆ID = "annotationMethodHandlerAdapter" クラス= "org.springframework.web.portlet.mvc.annotation .AnnotationMethodHandlerAdapter "> \t <プロパティ名=" webBindingInitializer "> \t <ビーンID =" configurableWebBindingInitializer」クラス= "org.springframework.web.bind.support.ConfigurableWebBindingInitializer"> \t <プロパティ名= "バリ"> \t –
jack
\t \t \t – jack