pk_id 和 tongId 两个字段在mysql 中都是 bigInteger类型,其中 tongID是无符号号类型, java jdbc 代码中 rs.getObject(s) 中 pk_id 为Long 类型 tongID为BigInteger 类型 <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.1.1</version> </dependency>
org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger. Use setObject() with an explicit Types value to specify the type to use.
public void setObject(int parameterIndex, Object x) throws SQLException { this.checkClosed(); if (x == null) { this.setNull(parameterIndex, 1111); } else if (x instanceof UUID && this.connection.haveMinimumServerVersion(ServerVersion.v8_3)) { this.setUuid(parameterIndex, (UUID)x); } else if (x instanceof SQLXML) { this.setSQLXML(parameterIndex, (SQLXML)x); } else if (x instanceof String) { this.setString(parameterIndex, (String)x); } else if (x instanceof BigDecimal) { this.setBigDecimal(parameterIndex, (BigDecimal)x); } else if (x instanceof Short) { this.setShort(paramete