Mybaits-@Options(useGeneratedKeys = true, keyProperty = "xxxx")做用

Mybaits之@Options(useGeneratedKeys = true, keyProperty = 「xxxx」)做用 useGeneratedKeys 設置爲"true"代表要 MyBatis 獲取由數據庫自動生成的主鍵; keyProperty="id"指定把獲取到的主鍵值注入到 XXX(實體類) 的 id 屬性。 如配置中開啓了@Options(useGeneratedKeys
相關文章
相關標籤/搜索