1. Description of the problem
mysql table field data type is datetime, the entity class attribute field corresponding to the data type java.util.Date
In doing insertion operation, if a direct assignment java.util.Date object database to the new data will be less eight hours,
2, the solution
2.1 Entity Type String class attribute field to
2.2 Formatting java.util.Date object class SimpleDateFormat formatted into a string of time, data is normally inserted.