I am newbie to Spring MVC. I was stuck by an error while running my project Error-The request sent by the client was syntactically incorrect. I have an enti
I had a similar issue recently and solved it by annotating my Date field with the @DateTimeFormat
. In your case, you would edit your PatientInfo.java
file to:
import org.spring.framework.annotation.DateTimeFormat;
@Column(name = "DateOfBirth")
@Temporal(TemporalType.TIMESTAMP)
@DateTimeFormat(pattern = ${pattern})
private Date dateOfBirth;
Make sure to replace ${pattern}
with a string representing the format that will be received (e.g. "yyyy-MM-dd").