SSM框架中将时间写入数据库的格式定义 //声明Date类接收的数据格式 @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date addtime;