【谷粒商城】3、找不到 longblob

问题:
在这里插入图片描述
原因:
java里面没有longblob类型,这个用renren-fast-generator自动生成的类型没有自动转换,改成 byte[]

错误位置将Longblob改为byte[]

private byte[] rollbackInfo;

在这里插入图片描述

  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
JdbcTemplate is a class in the Spring Framework that simplifies database operations using JDBC (Java Database Connectivity). It provides convenient methods to execute SQL statements, perform queries, and handle result sets. Regarding your question about longblob, it is a data type in certain databases, such as MySQL, used to store binary large objects (BLOBs) with a maximum length of 4GB. In the context of JdbcTemplate, you can use it to insert or retrieve binary data from a longblob column in your database. To use JdbcTemplate with longblob data, you would typically create an instance of JdbcTemplate and configure it with a DataSource object that represents your database connection. Then, you can use the JdbcTemplate methods to execute SQL statements or queries that involve longblob columns. Here's an example of using JdbcTemplate to insert longblob data into a database: ```java import org.springframework.jdbc.core.JdbcTemplate; // ... JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); byte[] binaryData = // your binary data String sql = "INSERT INTO your_table (longblob_column) VALUES (?)"; jdbcTemplate.update(sql, binaryData); ``` In this example, `dataSource` represents your configured DataSource object, and `your_table` is the table where you want to insert the longblob data. `longblob_column` is the specific column of type longblob. Remember to adjust the SQL statement and table/column names according to your database schema. I hope this answers your question. Let me know if you have any further queries!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值