java.sql.SQLException: Data truncated for column 'lastSeason' at row 1

The project will use the stored data to datetime fields, throws this exception

And I was using to store past Java.util.Date

Solution code is as follows: 
a Date DATE = new new a Date (); 
demo.setLastSeason ( new new Timestamp (date.getTime ()));

 

Guess you like

Origin www.cnblogs.com/zengguoqiang/p/10960146.html