pstmt.getGeneratedKeys()更换jar包后报错

改成:
pstmt=conn.prepareStatement(sql,Statement.RETURN_GENERATED_KEYS);
rs=pstmt.getGeneratedKeys();

即可!

原文地址:https://www.cnblogs.com/penghq/p/9662382.html