Solve springboot + maven + swagger back in time to return to the foreground deviation problems
Can be solved in two ways
1. added to the entity class attribute type Date annotation
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
Mainly timezone = "GMT + 8" regulate action time error; Date disadvantage is that each entity attribute of each item in the class must add annotations, the embodiment of FIG: it can also choose the second method.
2. Add the configuration file in application.yml inside:
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
Where the date-format write from time to write, to see to their needs, oh I did not use, for example, the figure below: