You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
Which version of Sharding-Jdbc do you using?
1.5.3
Expected behavior
自增主键的表应该能正常插入,现在不能正常插入。
Actual behavior
抛出异常:详情看demo
java.sql.SQLException: Generated keys not requested. You need to specify Statement.RETURN_GENERATED_KEYS to Statement.executeUpdate(), Statement.executeLargeUpdate() or Connection.prepareStatement().
Please answer these questions before submitting your issue. Thanks!
Which version of Sharding-Jdbc do you using?
1.5.3
Expected behavior
自增主键的表应该能正常插入,现在不能正常插入。
Actual behavior
抛出异常:详情看demo
java.sql.SQLException: Generated keys not requested. You need to specify Statement.RETURN_GENERATED_KEYS to Statement.executeUpdate(), Statement.executeLargeUpdate() or Connection.prepareStatement().
Steps to reproduce the behavior
重现步骤
1.执行demo中的sql文件建表
2.配置application.properties中的数据库连接信息
3.运行DemoSjApplication类里的主函数
3.打开 http://localhost:8080/ 返回json串则正常添加,否则出现上述所说的异常。。
/*
pom文件里注释1.5.3 的引入,切换为 1.4.2则可正常返回
根据tangmin721 所说的,我测试了下,1.5.2是正常的,1.5.3就不行了。
*/
Please provide the reproduce example codes (such as github link) if possible.
demo地址:https://github.com/pptom/demo-sj
The text was updated successfully, but these errors were encountered: