최신으로 문자열로 변환 할 수 없습니다 :봄 검증 : 그러나 내가지고있어, 좀 봄 양식 유효성 검사를하고 있어요
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이 이에 대한 책임이 있다고 생각합니까?
최대 절전 모드 유효성 검사기 4.0을 사용하고 있습니다.
' '이 있습니까? –
axtavt
이것은 포틀릿에 있으므로 mvc : annotation-driven가 작동하지 않는다는 것을 잊어 버리십시오. 내가 사용하는 : \t \t \t <속성 이름 ="webBindingInitializer "> \t <콩 ID ="configurableWebBindingInitializer "클래스 ="org.springframework.web.bind.support.ConfigurableWebBindingInitializer "> \t <속성 이름 ="검증 "> \t –
jack
\t \t \t – jack