spring boot中data truncation data too long for column问题
生活随笔
收集整理的这篇文章主要介绍了
spring boot中data truncation data too long for column问题
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
为什么80%的码农都做不了架构师?>>>
问题
根据报错可知,就是之前在数据库中定义的字段太短了,存不下新的数据
解决
@Column(length = 3000)private String cellExcel;手动定义字段长度,但这不会对已经存在对表进行生效,故还是需要使用SQL语句手动修改表字段长度,即:
ALTER TABLE budgetdb.form_template_field MODIFY COLUMN cell_excel VARCHAR(3000);参考
- com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'aboutMeText' at row 1
转载于:https://my.oschina.net/fxtxz2/blog/3038766
总结
以上是生活随笔为你收集整理的spring boot中data truncation data too long for column问题的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 用组策略提升网速
- 下一篇: ACK容器服务发布virtual nod