The front-end page uses antd's time selector, and then always reports an error when transmitting the time:
Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type java.util.Date
from String “2020-08-04T02:04:17.727Z”: expected format "yyyy-MM-dd HH:mm:ss"
The time format of the back-end entity class is
. The requirements in the database actually only use year, month and day, instead of hours, minutes and seconds,
so the backend changes the time format to the
front-end time selector control, and there is an attribute of formatting. Time value,
then I also added this attribute to the component.
The data format of the front and back ends must be consistent. After setting, the time can be successfully submitted.