想要实现的功能就是签到签退,点击签到按钮的时候,出现问题:
严重: Servlet.service() for servlet [springmvc] in context with path [/OA_web] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException:
### Error updating database. Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect date value: '11:41:13' for column 'time_out' at row 2这个问题的大致意思就是类型转换错误,我在代码中设置的是,这个时间为String类型,但是我在数据库中,这个签到时间设置的类型为Date,所以出现了无法将字符型转换为时间类型,修改数据库中时间字段类型即可

版权声明:本文为mask_boys原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。