mybatis中文文檔
學習和研究mybatis框架,我一般會參考mybatis中文文檔,這是mybatis官方維護的一份指導學習文檔,具有權威性:
https://mybatis.org/mybatis-3/zh/index.html
此文檔開頭會標明mybatis當前最新版本號:
mybatis中文文檔分為以下幾個部分:
XML配置:https://mybatis.org/mybatis-3/zh/configuration.html
XML映射:https://mybatis.org/mybatis-3/zh/sqlmap-xml.html
動態SQL:https://mybatis.org/mybatis-3/zh/dynamic-sql.html
Java API:https://mybatis.org/mybatis-3/zh/java-api.html
SQL語句構建器:https://mybatis.org/mybatis-3/zh/statement-builders.html
日志:https://mybatis.org/mybatis-3/zh/logging.html
我們公司近期對oracle11g做了一次升級,升級版本為oracle19c,我發現19c多了列的自增屬性,于是我給主鍵設置了自增,類似于mysql的自增主鍵,但是我使用mybatis做Inset操作時,無法獲取這個自增主鍵的值,請問有什么好的解決辦法么?
通過這個注解@Options(useGeneratedKeys = true, keyColumn = "ID", keyProperty = "id")可以實現獲取表的自增列,
需要說明的是keyProperty是你的查詢方法入參實體類的屬性id